mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-01 23:48:40 -05:00
Update go slot list yield and move fetch
This commit is contained in:
@@ -20,7 +20,7 @@ private EncounterArea7g(int species, int form) : base(GameVersion.GO)
|
||||
{
|
||||
Species = species;
|
||||
Form = form;
|
||||
Location = 50;
|
||||
Location = Locations.GO7;
|
||||
}
|
||||
|
||||
internal static EncounterArea7g[] GetArea(byte[][] data)
|
||||
|
||||
@@ -180,10 +180,7 @@ private static IEnumerable<EncounterArea> GetEncounterTable(PKM pkm, GameVersion
|
||||
case GameVersion.GP: return SlotsGP;
|
||||
case GameVersion.GE: return SlotsGE;
|
||||
case GameVersion.GO:
|
||||
if (pkm.Met_Location == Locations.GO8)
|
||||
return SlotsGO;
|
||||
else // LGPE GO
|
||||
return SlotsGO_GG;
|
||||
return GetEncounterTableGO(pkm);
|
||||
|
||||
case GameVersion.SW: return SlotsSW;
|
||||
case GameVersion.SH: return SlotsSH;
|
||||
@@ -214,5 +211,21 @@ private static IEnumerable<EncounterArea> GetEncounterTableGSC(PKM pkm)
|
||||
// or it can be a Crystal pokemon that lost met location after being tradeback to gen 1 games
|
||||
return SlotsGSC;
|
||||
}
|
||||
|
||||
private static IEnumerable<EncounterArea> GetEncounterTableGO(PKM pkm)
|
||||
{
|
||||
if (pkm.Format < 8)
|
||||
return SlotsGO_GG;
|
||||
|
||||
// If we know the met location, return the specific area list.
|
||||
// If we're just getting all encounters (lack of met location is kinda bad...), just return everything.
|
||||
var met = pkm.Met_Location;
|
||||
return met switch
|
||||
{
|
||||
Locations.GO8 => SlotsGO,
|
||||
Locations.GO7 => SlotsGO_GG,
|
||||
_ => SlotsGO_GG.Concat<EncounterArea>(SlotsGO),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,8 @@ private static LearnVersion GetIsLevelUp8(int species, int move, int lvl, int fo
|
||||
switch (ver)
|
||||
{
|
||||
case Any:
|
||||
case SW: case SH:
|
||||
case GO:
|
||||
case SW: case SH: case SWSH:
|
||||
if (species > MaxSpeciesID_8)
|
||||
return LearnNONE;
|
||||
return LearnSWSH.GetIsLevelUp(species, form, move, lvl);
|
||||
@@ -474,6 +475,7 @@ private static List<int> AddMovesLevelUp8(List<int> moves, GameVersion ver, int
|
||||
switch (ver)
|
||||
{
|
||||
case Any:
|
||||
case GO:
|
||||
case SW: case SH: case SWSH:
|
||||
if (species > MaxSpeciesID_8)
|
||||
return moves;
|
||||
|
||||
@@ -79,6 +79,9 @@ public static class Locations
|
||||
/// <summary> Generation 6 Gift from Pokémon Link </summary>
|
||||
public const int LinkGift6 = 30011;
|
||||
|
||||
/// <summary> Generation 7 Transfer from GO to Pokémon LGP/E's GO Park </summary>
|
||||
public const int GO7 = 50;
|
||||
|
||||
/// <summary> Generation 8 Transfer from GO to Pokémon HOME </summary>
|
||||
public const int GO8 = 30012;
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@ private void SetID7(int sid7, int tid7)
|
||||
public bool SWSH => Version == (int)GameVersion.SW || Version == (int)GameVersion.SH;
|
||||
|
||||
protected bool PtHGSS => Pt || HGSS;
|
||||
public bool GO_LGPE => GO && Met_Location == 50;
|
||||
public bool GO_LGPE => GO && Met_Location == Locations.GO7;
|
||||
public bool GO_HOME => GO && Met_Location == Locations.GO8;
|
||||
public bool VC => VC1 || VC2;
|
||||
public bool GG => LGPE || GO_LGPE;
|
||||
|
||||
Reference in New Issue
Block a user