mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Allow PA8 HT from Gen7, prefer min from PLA
Closes #3527 ty @spacesonata !
This commit is contained in:
parent
51edaac704
commit
78092e070d
2 changed files with 7 additions and 4 deletions
|
@ -176,10 +176,13 @@ namespace PKHeX.Core
|
|||
|
||||
private static int GetMinLevelKnowRequiredMove(PKM pkm, int gen, int index, EvolutionHistory evos)
|
||||
{
|
||||
if (gen == 8 && pkm.HasVisitedLA(evos.Gen8a)) // No Level Up required, and different levels than mainline SW/SH.
|
||||
return MinLevelEvolutionWithMove_8LA[index];
|
||||
|
||||
var lvl = GetLevelLearnMove(pkm, gen, index);
|
||||
if (pkm.HasVisitedLA(evos.Gen8a)) // No Level Up required, and different levels than mainline SW/SH.
|
||||
{
|
||||
var la = MinLevelEvolutionWithMove_8LA[index];
|
||||
if (la <= lvl)
|
||||
return la;
|
||||
}
|
||||
|
||||
// If has original met location the minimum evolution level is one level after met level
|
||||
// Gen 3 pokemon in gen 4 games: minimum level is one level after transfer to generation 4
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace PKHeX.Core
|
|||
public static bool IsHyperTrainingAvailable(this IHyperTrain t, EvolutionHistory h) => t switch
|
||||
{
|
||||
// Check for game formats where training is unavailable:
|
||||
PA8 pa8 => pa8.HasVisitedSWSH(h.Gen8) || pa8.HasVisitedBDSP(h.Gen8b),
|
||||
PA8 pa8 => h.Gen7.Length > 0 || pa8.HasVisitedSWSH(h.Gen8) || pa8.HasVisitedBDSP(h.Gen8b),
|
||||
_ => true,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue