mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 12:35:20 -05:00
Fix lgpe moveset restriction
Closes #2704 Co-Authored-By: BetaLeaf <betaleaf@gmail.com>
This commit is contained in:
parent
6346444db7
commit
75d8635580
|
|
@ -792,7 +792,7 @@ private static IEnumerable<int> GetMoves(PKM pkm, int species, int minlvlG1, int
|
|||
internal static bool HasVisitedB2W2(this PKM pkm) => pkm.InhabitedGeneration(5);
|
||||
internal static bool HasVisitedORAS(this PKM pkm) => pkm.InhabitedGeneration(6) && (pkm.AO || !pkm.IsUntraded);
|
||||
internal static bool HasVisitedUSUM(this PKM pkm) => pkm.InhabitedGeneration(7) && (pkm.USUM || !pkm.IsUntraded);
|
||||
internal static bool IsMovesetRestricted(this PKM pkm) => (pkm.GG && pkm.Format == 7) || pkm.IsUntraded;
|
||||
internal static bool IsMovesetRestricted(this PKM pkm, int gen) => (pkm.GG && gen == 7) || pkm.IsUntraded;
|
||||
|
||||
public static bool HasMetLocationUpdatedTransfer(int originalGeneration, int currentGeneration)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ private static readonly LearnLookup
|
|||
|
||||
public static LearnVersion GetIsLevelUpMove(PKM pkm, int species, int form, int lvl, int generation, int move, int minlvlG1, int minlvlG2, GameVersion version = Any)
|
||||
{
|
||||
if (pkm.IsMovesetRestricted())
|
||||
if (pkm.IsMovesetRestricted(generation))
|
||||
version = (GameVersion)pkm.Version;
|
||||
|
||||
switch (generation)
|
||||
|
|
@ -263,7 +263,7 @@ private static GameVersion GetDeoxysGameVersion3(int form)
|
|||
|
||||
public static IEnumerable<int> GetMovesLevelUp(PKM pkm, int species, int minlvlG1, int minlvlG2, int lvl, int form, GameVersion version, bool MoveReminder, int Generation)
|
||||
{
|
||||
if (pkm.IsMovesetRestricted())
|
||||
if (pkm.IsMovesetRestricted(Generation))
|
||||
version = (GameVersion)pkm.Version;
|
||||
return Generation switch
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ internal static class MoveTechnicalMachine
|
|||
{
|
||||
internal static GameVersion GetIsMachineMove(PKM pkm, int species, int form, int generation, int move, GameVersion ver = GameVersion.Any, bool RemoveTransfer = false, bool allowBit = false)
|
||||
{
|
||||
if (pkm.IsMovesetRestricted())
|
||||
if (pkm.IsMovesetRestricted(generation))
|
||||
ver = (GameVersion) pkm.Version;
|
||||
switch (generation)
|
||||
{
|
||||
|
|
@ -251,7 +251,7 @@ private static GameVersion GetIsMachine8(PKM pkm, int species, int move, int for
|
|||
internal static IEnumerable<int> GetTMHM(PKM pkm, int species, int form, int generation, GameVersion ver = GameVersion.Any, bool RemoveTransfer = true)
|
||||
{
|
||||
var r = new List<int>();
|
||||
if (pkm.IsMovesetRestricted())
|
||||
if (pkm.IsMovesetRestricted(generation))
|
||||
ver = (GameVersion)pkm.Version;
|
||||
|
||||
switch (generation)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user