mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 06:34:19 +00:00
Converted PKHeX.Core to .Net Standard
Refactored and rearranged things as needed to allow the change
This commit is contained in:
parent
3e47e1e138
commit
52c4fbbe97
2633 changed files with 50212 additions and 51669 deletions
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using static PKHeX.Core.LegalityCheckStrings;
|
||||
|
||||
namespace PKHeX.Core
|
||||
|
@ -283,8 +284,8 @@ namespace PKHeX.Core
|
|||
pkm.TradebackStatus = TradebackType.WasTradeback;
|
||||
|
||||
MatchedType = Type = (EncounterOriginalGB ?? EncounterMatch ?? pkm.Species)?.GetType();
|
||||
var bt = Type.BaseType;
|
||||
if (bt != null && !(bt == typeof(Array) || bt == typeof(object) || bt.IsPrimitive)) // a parent exists
|
||||
var bt = Type.GetTypeInfo().BaseType;
|
||||
if (bt != null && !(bt == typeof(Array) || bt == typeof(object) || bt.GetTypeInfo().IsPrimitive)) // a parent exists
|
||||
Type = bt; // use base type
|
||||
}
|
||||
private void updateChecks()
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using static PKHeX.Core.LegalityCheckStrings;
|
||||
|
||||
namespace PKHeX.Core
|
||||
|
@ -3042,7 +3043,7 @@ namespace PKHeX.Core
|
|||
if (res.Any(r => !r.Valid))
|
||||
return res;
|
||||
|
||||
if (pkm.GenNumber >= 6 && EncounterMatch.GetType().IsSubclassOf(typeof(MysteryGift)))
|
||||
if (pkm.GenNumber >= 6 && EncounterMatch.GetType().GetTypeInfo().IsSubclassOf(typeof(MysteryGift)))
|
||||
RelearnBase = ((MysteryGift)EncounterMatch).RelearnMoves;
|
||||
return res;
|
||||
}
|
|
@ -1,8 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using PKHeX.Core.Properties;
|
||||
using System.Globalization;
|
||||
using static PKHeX.Core.LegalityCheckStrings;
|
||||
|
||||
namespace PKHeX.Core
|
||||
|
@ -20,7 +19,7 @@ namespace PKHeX.Core
|
|||
/// <summary>Setting to specify if the e-berry index item is an eningma berry or a e-reader berry and the name of the e-reader berry</summary>
|
||||
public static bool EReaderBerryIsEnigma = true;
|
||||
public static string EReaderBerryName = string.Empty;
|
||||
public static string EReaderBerryDisplayName => string.Format(V372, CultureInfo.CurrentCulture.TextInfo.ToTitleCase(EReaderBerryName.ToLower()));
|
||||
public static string EReaderBerryDisplayName => string.Format(V372, Util.toTitleCase(EReaderBerryName.ToLower()));
|
||||
public static bool SavegameJapanese = false;
|
||||
public static string Savegame_OT = string.Empty;
|
||||
public static int Savegame_TID = 0;
|
||||
|
@ -29,66 +28,152 @@ namespace PKHeX.Core
|
|||
public static GameVersion Savegame_Version = GameVersion.Any;
|
||||
|
||||
// Gen 1
|
||||
private static readonly Learnset[] LevelUpRB = Learnset1.getArray(Resources.lvlmove_rb, MaxSpeciesID_1);
|
||||
private static readonly Learnset[] LevelUpY = Learnset1.getArray(Resources.lvlmove_y, MaxSpeciesID_1);
|
||||
private static readonly Learnset[] LevelUpRB = Learnset1.getArray(Util.getBinaryResource("lvlmove_rb.pkl"), MaxSpeciesID_1);
|
||||
private static readonly Learnset[] LevelUpY = Learnset1.getArray(Util.getBinaryResource("lvlmove_y.pkl"), MaxSpeciesID_1);
|
||||
private static readonly EvolutionTree Evolves1;
|
||||
private static readonly EncounterArea[] SlotsRBY;
|
||||
private static readonly EncounterStatic[] StaticRBY;
|
||||
|
||||
// Gen 2
|
||||
private static readonly EggMoves[] EggMovesGS = EggMoves2.getArray(Resources.eggmove_gs, MaxSpeciesID_2);
|
||||
private static readonly Learnset[] LevelUpGS = Learnset1.getArray(Resources.lvlmove_gs, MaxSpeciesID_2);
|
||||
private static readonly EggMoves[] EggMovesC = EggMoves2.getArray(Resources.eggmove_c, MaxSpeciesID_2);
|
||||
private static readonly Learnset[] LevelUpC = Learnset1.getArray(Resources.lvlmove_c, MaxSpeciesID_2);
|
||||
private static readonly EggMoves[] EggMovesGS = EggMoves2.getArray(Util.getBinaryResource("eggmove_gs.pkl"), MaxSpeciesID_2);
|
||||
private static readonly Learnset[] LevelUpGS = Learnset1.getArray(Util.getBinaryResource("lvlmove_gs.pkl"), MaxSpeciesID_2);
|
||||
private static readonly EggMoves[] EggMovesC = EggMoves2.getArray(Util.getBinaryResource("eggmove_c.pkl"), MaxSpeciesID_2);
|
||||
private static readonly Learnset[] LevelUpC = Learnset1.getArray(Util.getBinaryResource("lvlmove_c.pkl"), MaxSpeciesID_2);
|
||||
private static readonly EvolutionTree Evolves2;
|
||||
private static readonly EncounterArea[] SlotsGSC, SlotsGS, SlotsC;
|
||||
private static readonly EncounterStatic[] StaticGSC, StaticGS, StaticC;
|
||||
|
||||
// Gen 3
|
||||
private static readonly Learnset[] LevelUpE = Learnset6.getArray(Data.unpackMini(Resources.lvlmove_e, "em"));
|
||||
private static readonly Learnset[] LevelUpRS = Learnset6.getArray(Data.unpackMini(Resources.lvlmove_rs, "rs"));
|
||||
private static readonly Learnset[] LevelUpFR = Learnset6.getArray(Data.unpackMini(Resources.lvlmove_fr, "fr"));
|
||||
private static readonly Learnset[] LevelUpLG = Learnset6.getArray(Data.unpackMini(Resources.lvlmove_lg, "lg"));
|
||||
private static readonly EggMoves[] EggMovesRS = EggMoves6.getArray(Data.unpackMini(Resources.eggmove_rs, "rs"));
|
||||
private static readonly Learnset[] LevelUpE = Learnset6.getArray(Data.unpackMini(Util.getBinaryResource("lvlmove_e.pkl"), "em"));
|
||||
private static readonly Learnset[] LevelUpRS = Learnset6.getArray(Data.unpackMini(Util.getBinaryResource("lvlmove_rs.pkl"), "rs"));
|
||||
private static readonly Learnset[] LevelUpFR = Learnset6.getArray(Data.unpackMini(Util.getBinaryResource("lvlmove_fr.pkl"), "fr"));
|
||||
private static readonly Learnset[] LevelUpLG = Learnset6.getArray(Data.unpackMini(Util.getBinaryResource("lvlmove_lg.pkl"), "lg"));
|
||||
private static readonly EggMoves[] EggMovesRS = EggMoves6.getArray(Data.unpackMini(Util.getBinaryResource("eggmove_rs.pkl"), "rs"));
|
||||
private static readonly EvolutionTree Evolves3;
|
||||
private static readonly EncounterArea[] SlotsR, SlotsS, SlotsE, SlotsFR, SlotsLG;
|
||||
private static readonly EncounterStatic[] StaticR, StaticS, StaticE, StaticFR, StaticLG;
|
||||
|
||||
// Gen 4
|
||||
private static readonly Learnset[] LevelUpDP = Learnset6.getArray(Data.unpackMini(Resources.lvlmove_dp, "dp"));
|
||||
private static readonly Learnset[] LevelUpPt = Learnset6.getArray(Data.unpackMini(Resources.lvlmove_pt, "pt"));
|
||||
private static readonly Learnset[] LevelUpHGSS = Learnset6.getArray(Data.unpackMini(Resources.lvlmove_hgss, "hs"));
|
||||
private static readonly EggMoves[] EggMovesDPPt = EggMoves6.getArray(Data.unpackMini(Resources.eggmove_dppt, "dp"));
|
||||
private static readonly EggMoves[] EggMovesHGSS = EggMoves6.getArray(Data.unpackMini(Resources.eggmove_hgss, "hs"));
|
||||
private static readonly Learnset[] LevelUpDP = Learnset6.getArray(Data.unpackMini(Util.getBinaryResource("lvlmove_dp.pkl"), "dp"));
|
||||
private static readonly Learnset[] LevelUpPt = Learnset6.getArray(Data.unpackMini(Util.getBinaryResource("lvlmove_pt.pkl"), "pt"));
|
||||
private static readonly Learnset[] LevelUpHGSS = Learnset6.getArray(Data.unpackMini(Util.getBinaryResource("lvlmove_hgss.pkl"), "hs"));
|
||||
private static readonly EggMoves[] EggMovesDPPt = EggMoves6.getArray(Data.unpackMini(Util.getBinaryResource("eggmove_dppt.pkl"), "dp"));
|
||||
private static readonly EggMoves[] EggMovesHGSS = EggMoves6.getArray(Data.unpackMini(Util.getBinaryResource("eggmove_hgss.pkl"), "hs"));
|
||||
private static readonly EvolutionTree Evolves4;
|
||||
private static readonly EncounterArea[] SlotsD, SlotsP, SlotsPt, SlotsHG, SlotsSS;
|
||||
private static readonly EncounterStatic[] StaticD, StaticP, StaticPt, StaticHG, StaticSS;
|
||||
|
||||
// Gen 5
|
||||
private static readonly Learnset[] LevelUpBW = Learnset6.getArray(Data.unpackMini(Resources.lvlmove_bw, "51"));
|
||||
private static readonly Learnset[] LevelUpB2W2 = Learnset6.getArray(Data.unpackMini(Resources.lvlmove_b2w2, "52"));
|
||||
private static readonly EggMoves[] EggMovesBW = EggMoves6.getArray(Data.unpackMini(Resources.eggmove_bw, "bw"));
|
||||
private static readonly Learnset[] LevelUpBW = Learnset6.getArray(Data.unpackMini(Util.getBinaryResource("lvlmove_bw.pkl"), "51"));
|
||||
private static readonly Learnset[] LevelUpB2W2 = Learnset6.getArray(Data.unpackMini(Util.getBinaryResource("lvlmove_b2w2.pkl"), "52"));
|
||||
private static readonly EggMoves[] EggMovesBW = EggMoves6.getArray(Data.unpackMini(Util.getBinaryResource("eggmove_bw.pkl"), "bw"));
|
||||
private static readonly EvolutionTree Evolves5;
|
||||
private static readonly EncounterArea[] SlotsB, SlotsW, SlotsB2, SlotsW2;
|
||||
private static readonly EncounterStatic[] StaticB, StaticW, StaticB2, StaticW2;
|
||||
|
||||
// Gen 6
|
||||
private static readonly EggMoves[] EggMovesXY = EggMoves6.getArray(Data.unpackMini(Resources.eggmove_xy, "xy"));
|
||||
private static readonly Learnset[] LevelUpXY = Learnset6.getArray(Data.unpackMini(Resources.lvlmove_xy, "xy"));
|
||||
private static readonly EggMoves[] EggMovesAO = EggMoves6.getArray(Data.unpackMini(Resources.eggmove_ao, "ao"));
|
||||
private static readonly Learnset[] LevelUpAO = Learnset6.getArray(Data.unpackMini(Resources.lvlmove_ao, "ao"));
|
||||
private static readonly EggMoves[] EggMovesXY = EggMoves6.getArray(Data.unpackMini(Util.getBinaryResource("eggmove_xy.pkl"), "xy"));
|
||||
private static readonly Learnset[] LevelUpXY = Learnset6.getArray(Data.unpackMini(Util.getBinaryResource("lvlmove_xy.pkl"), "xy"));
|
||||
private static readonly EggMoves[] EggMovesAO = EggMoves6.getArray(Data.unpackMini(Util.getBinaryResource("eggmove_ao.pkl"), "ao"));
|
||||
private static readonly Learnset[] LevelUpAO = Learnset6.getArray(Data.unpackMini(Util.getBinaryResource("lvlmove_ao.pkl"), "ao"));
|
||||
private static readonly EvolutionTree Evolves6;
|
||||
private static readonly EncounterArea[] SlotsX, SlotsY, SlotsA, SlotsO;
|
||||
private static readonly EncounterStatic[] StaticX, StaticY, StaticA, StaticO;
|
||||
|
||||
// Gen 7
|
||||
private static readonly EggMoves[] EggMovesSM = EggMoves7.getArray(Data.unpackMini(Resources.eggmove_sm, "sm"));
|
||||
private static readonly Learnset[] LevelUpSM = Learnset7.getArray(Data.unpackMini(Resources.lvlmove_sm, "sm"));
|
||||
private static readonly EggMoves[] EggMovesSM = EggMoves7.getArray(Data.unpackMini(Util.getBinaryResource("eggmove_sm.pkl"), "sm"));
|
||||
private static readonly Learnset[] LevelUpSM = Learnset7.getArray(Data.unpackMini(Util.getBinaryResource("lvlmove_sm.pkl"), "sm"));
|
||||
private static readonly EvolutionTree Evolves7;
|
||||
private static readonly EncounterArea[] SlotsSN, SlotsMN;
|
||||
private static readonly EncounterStatic[] StaticSN, StaticMN;
|
||||
|
||||
// Setup Help
|
||||
private static HashSet<MysteryGift> getPCDDB(byte[] bin)
|
||||
{
|
||||
var db = new HashSet<MysteryGift>();
|
||||
for (int i = 0; i < bin.Length; i += PCD.Size)
|
||||
{
|
||||
byte[] data = new byte[PCD.Size];
|
||||
Buffer.BlockCopy(bin, i, data, 0, PCD.Size);
|
||||
db.Add(new PCD(data));
|
||||
}
|
||||
return db;
|
||||
}
|
||||
private static HashSet<MysteryGift> getPGFDB(byte[] bin)
|
||||
{
|
||||
var db = new HashSet<MysteryGift>();
|
||||
for (int i = 0; i < bin.Length; i += PGF.Size)
|
||||
{
|
||||
byte[] data = new byte[PGF.Size];
|
||||
Buffer.BlockCopy(bin, i, data, 0, PGF.Size);
|
||||
db.Add(new PGF(data));
|
||||
}
|
||||
return db;
|
||||
}
|
||||
private static HashSet<MysteryGift> getWC6DB(byte[] wc6bin, byte[] wc6full)
|
||||
{
|
||||
var db = new HashSet<MysteryGift>();
|
||||
for (int i = 0; i < wc6bin.Length; i += WC6.Size)
|
||||
{
|
||||
byte[] data = new byte[WC6.Size];
|
||||
Buffer.BlockCopy(wc6bin, i, data, 0, WC6.Size);
|
||||
db.Add(new WC6(data));
|
||||
}
|
||||
for (int i = 0; i < wc6full.Length; i += WC6.SizeFull)
|
||||
{
|
||||
byte[] data = new byte[WC6.SizeFull];
|
||||
Buffer.BlockCopy(wc6full, i, data, 0, WC6.SizeFull);
|
||||
db.Add(new WC6(data));
|
||||
}
|
||||
return db;
|
||||
}
|
||||
private static HashSet<MysteryGift> getWC7DB(byte[] wc7bin, byte[] wc7full)
|
||||
{
|
||||
var db = new HashSet<MysteryGift>();
|
||||
for (int i = 0; i < wc7bin.Length; i += WC7.Size)
|
||||
{
|
||||
byte[] data = new byte[WC7.Size];
|
||||
Buffer.BlockCopy(wc7bin, i, data, 0, WC7.Size);
|
||||
db.Add(new WC7(data));
|
||||
}
|
||||
for (int i = 0; i < wc7full.Length; i += WC7.SizeFull)
|
||||
{
|
||||
byte[] data = new byte[WC7.SizeFull];
|
||||
Buffer.BlockCopy(wc7full, i, data, 0, WC7.SizeFull);
|
||||
db.Add(new WC7(data));
|
||||
}
|
||||
return db;
|
||||
}
|
||||
public static void RefreshMGDB(string localDbPath)
|
||||
{
|
||||
var g4 = getPCDDB(Util.getBinaryResource("pcd"));
|
||||
var g5 = getPGFDB(Util.getBinaryResource("pgf"));
|
||||
var g6 = getWC6DB(Util.getBinaryResource("wc6"), Util.getBinaryResource("wc6full"));
|
||||
var g7 = getWC7DB(Util.getBinaryResource("wc7"), Util.getBinaryResource("wc7full"));
|
||||
|
||||
if (Directory.Exists(localDbPath))
|
||||
foreach (var file in Directory.GetFiles(localDbPath, "*", SearchOption.AllDirectories))
|
||||
{
|
||||
var fi = new FileInfo(file);
|
||||
if (!MysteryGift.getIsMysteryGift(fi.Length))
|
||||
continue;
|
||||
|
||||
var gift = MysteryGift.getMysteryGift(File.ReadAllBytes(file), fi.Extension);
|
||||
switch (gift?.Format)
|
||||
{
|
||||
case 4: g4.Add(gift); continue;
|
||||
case 5: g5.Add(gift); continue;
|
||||
case 6: g6.Add(gift); continue;
|
||||
case 7: g7.Add(gift); continue;
|
||||
}
|
||||
}
|
||||
|
||||
Legal.MGDB_G4 = g4.ToArray();
|
||||
Legal.MGDB_G5 = g5.ToArray();
|
||||
Legal.MGDB_G6 = g6.ToArray();
|
||||
Legal.MGDB_G7 = g7.ToArray();
|
||||
}
|
||||
|
||||
private static EncounterStatic[] getStaticEncounters(GameVersion Game)
|
||||
{
|
||||
EncounterStatic[] table;
|
||||
|
@ -147,26 +232,26 @@ namespace PKHeX.Core
|
|||
byte[] tables = null;
|
||||
switch (Game)
|
||||
{
|
||||
case GameVersion.R: return EncounterArea.getArray3(Data.unpackMini(Resources.encounter_r, "ru"));
|
||||
case GameVersion.S: return EncounterArea.getArray3(Data.unpackMini(Resources.encounter_s, "sa"));
|
||||
case GameVersion.E: return EncounterArea.getArray3(Data.unpackMini(Resources.encounter_e, "em"));
|
||||
case GameVersion.FR: return EncounterArea.getArray3(Data.unpackMini(Resources.encounter_fr, "fr"));
|
||||
case GameVersion.LG: return EncounterArea.getArray3(Data.unpackMini(Resources.encounter_lg, "lg"));
|
||||
case GameVersion.D: return EncounterArea.getArray4DPPt(Data.unpackMini(Resources.encounter_d, "da"));
|
||||
case GameVersion.P: return EncounterArea.getArray4DPPt(Data.unpackMini(Resources.encounter_p, "pe"));
|
||||
case GameVersion.Pt: return EncounterArea.getArray4DPPt(Data.unpackMini(Resources.encounter_pt, "pt"));
|
||||
case GameVersion.HG: return EncounterArea.getArray4HGSS(Data.unpackMini(Resources.encounter_hg, "hg"));
|
||||
case GameVersion.SS: return EncounterArea.getArray4HGSS(Data.unpackMini(Resources.encounter_ss, "ss"));
|
||||
case GameVersion.B: ident = "51"; tables = Resources.encounter_b; break;
|
||||
case GameVersion.W: ident = "51"; tables = Resources.encounter_w; break;
|
||||
case GameVersion.B2: ident = "52"; tables = Resources.encounter_b2; break;
|
||||
case GameVersion.W2: ident = "52"; tables = Resources.encounter_w2; break;
|
||||
case GameVersion.X: ident = "xy"; tables = Resources.encounter_x; break;
|
||||
case GameVersion.Y: ident = "xy"; tables = Resources.encounter_y; break;
|
||||
case GameVersion.AS: ident = "ao"; tables = Resources.encounter_a; break;
|
||||
case GameVersion.OR: ident = "ao"; tables = Resources.encounter_o; break;
|
||||
case GameVersion.SN: ident = "sm"; tables = Resources.encounter_sn; break;
|
||||
case GameVersion.MN: ident = "sm"; tables = Resources.encounter_mn; break;
|
||||
case GameVersion.R: return EncounterArea.getArray3(Data.unpackMini(Util.getBinaryResource("encounter_r.pkl"), "ru"));
|
||||
case GameVersion.S: return EncounterArea.getArray3(Data.unpackMini(Util.getBinaryResource("encounter_s.pkl"), "sa"));
|
||||
case GameVersion.E: return EncounterArea.getArray3(Data.unpackMini(Util.getBinaryResource("encounter_e.pkl"), "em"));
|
||||
case GameVersion.FR: return EncounterArea.getArray3(Data.unpackMini(Util.getBinaryResource("encounter_fr.pkl"), "fr"));
|
||||
case GameVersion.LG: return EncounterArea.getArray3(Data.unpackMini(Util.getBinaryResource("encounter_lg.pkl"), "lg"));
|
||||
case GameVersion.D: return EncounterArea.getArray4DPPt(Data.unpackMini(Util.getBinaryResource("encounter_d.pkl"), "da"));
|
||||
case GameVersion.P: return EncounterArea.getArray4DPPt(Data.unpackMini(Util.getBinaryResource("encounter_p.pkl"), "pe"));
|
||||
case GameVersion.Pt: return EncounterArea.getArray4DPPt(Data.unpackMini(Util.getBinaryResource("encounter_pt.pkl"), "pt"));
|
||||
case GameVersion.HG: return EncounterArea.getArray4HGSS(Data.unpackMini(Util.getBinaryResource("encounter_hg.pkl"), "hg"));
|
||||
case GameVersion.SS: return EncounterArea.getArray4HGSS(Data.unpackMini(Util.getBinaryResource("encounter_ss.pkl"), "ss"));
|
||||
case GameVersion.B: ident = "51"; tables = Util.getBinaryResource("encounter_b.pkl"); break;
|
||||
case GameVersion.W: ident = "51"; tables = Util.getBinaryResource("encounter_w.pkl"); break;
|
||||
case GameVersion.B2: ident = "52"; tables = Util.getBinaryResource("encounter_b2.pkl"); break;
|
||||
case GameVersion.W2: ident = "52"; tables = Util.getBinaryResource("encounter_w2.pkl"); break;
|
||||
case GameVersion.X: ident = "xy"; tables = Util.getBinaryResource("encounter_x.pkl"); break;
|
||||
case GameVersion.Y: ident = "xy"; tables = Util.getBinaryResource("encounter_y.pkl"); break;
|
||||
case GameVersion.AS: ident = "ao"; tables = Util.getBinaryResource("encounter_a.pkl"); break;
|
||||
case GameVersion.OR: ident = "ao"; tables = Util.getBinaryResource("encounter_o.pkl"); break;
|
||||
case GameVersion.SN: ident = "sm"; tables = Util.getBinaryResource("encounter_sn.pkl"); break;
|
||||
case GameVersion.MN: ident = "sm"; tables = Util.getBinaryResource("encounter_mn.pkl"); break;
|
||||
}
|
||||
if (ident == null)
|
||||
return new EncounterArea[0];
|
||||
|
@ -581,11 +666,11 @@ namespace PKHeX.Core
|
|||
}
|
||||
private static EncounterArea[] getTables1()
|
||||
{
|
||||
var red_gw = EncounterArea.getArray1_GW(Resources.encounter_red);
|
||||
var blu_gw = EncounterArea.getArray1_GW(Resources.encounter_blue);
|
||||
var ylw_gw = EncounterArea.getArray1_GW(Resources.encounter_yellow);
|
||||
var rb_fish = EncounterArea.getArray1_F(Resources.encounter_rb_f);
|
||||
var ylw_fish = EncounterArea.getArray1_FY(Resources.encounter_yellow_f);
|
||||
var red_gw = EncounterArea.getArray1_GW(Util.getBinaryResource("encounter_red.pkl"));
|
||||
var blu_gw = EncounterArea.getArray1_GW(Util.getBinaryResource("encounter_blue.pkl"));
|
||||
var ylw_gw = EncounterArea.getArray1_GW(Util.getBinaryResource("encounter_yellow.pkl"));
|
||||
var rb_fish = EncounterArea.getArray1_F(Util.getBinaryResource("encounter_rb_f.pkl"));
|
||||
var ylw_fish = EncounterArea.getArray1_FY(Util.getBinaryResource("encounter_yellow_f.pkl"));
|
||||
|
||||
var table = addExtraTableSlots(red_gw, blu_gw, ylw_gw, rb_fish, ylw_fish);
|
||||
Array.Resize(ref table, table.Length + 1);
|
||||
|
@ -597,24 +682,24 @@ namespace PKHeX.Core
|
|||
{
|
||||
EncounterArea[] Slots = null;
|
||||
// Fishing
|
||||
var f = EncounterArea.getArray2_F(Resources.encounter_gsc_f);
|
||||
var f = EncounterArea.getArray2_F(Util.getBinaryResource("encounter_gsc_f.pkl"));
|
||||
if (Version == GameVersion.GS || Version == GameVersion.GSC)
|
||||
{
|
||||
// Grass/Water
|
||||
var g = EncounterArea.getArray2_GW(Resources.encounter_gold);
|
||||
var s = EncounterArea.getArray2_GW(Resources.encounter_silver);
|
||||
var g = EncounterArea.getArray2_GW(Util.getBinaryResource("encounter_gold.pkl"));
|
||||
var s = EncounterArea.getArray2_GW(Util.getBinaryResource("encounter_silver.pkl"));
|
||||
// Headbutt/Rock Smash
|
||||
var h_g = EncounterArea.getArray2_H(Resources.encounter_gold_h);
|
||||
var h_s = EncounterArea.getArray2_H(Resources.encounter_silver_h);
|
||||
var h_g = EncounterArea.getArray2_H(Util.getBinaryResource("encounter_gold_h.pkl"));
|
||||
var h_s = EncounterArea.getArray2_H(Util.getBinaryResource("encounter_silver_h.pkl"));
|
||||
|
||||
Slots = addExtraTableSlots(g, s, h_g, h_s, f);
|
||||
}
|
||||
if (Version == GameVersion.C || Version == GameVersion.GSC)
|
||||
{
|
||||
// Grass/Water
|
||||
var c = EncounterArea.getArray2_GW(Resources.encounter_crystal);
|
||||
var c = EncounterArea.getArray2_GW(Util.getBinaryResource("encounter_crystal.pkl"));
|
||||
// Headbutt/Rock Smash
|
||||
var h_c = EncounterArea.getArray2_H(Resources.encounter_crystal_h);
|
||||
var h_c = EncounterArea.getArray2_H(Util.getBinaryResource("encounter_crystal_h.pkl"));
|
||||
|
||||
var extra = addExtraTableSlots(c, h_c, f);
|
||||
return Version == GameVersion.C ? extra : addExtraTableSlots(Slots, extra);
|
||||
|
@ -632,7 +717,7 @@ namespace PKHeX.Core
|
|||
// Gen 1 is the only gen where ReduceAreasSize is not needed
|
||||
MarkEncountersGeneration(ref SlotsRBY, 1);
|
||||
MarkEncountersGeneration(ref StaticRBY, 1);
|
||||
Evolves1 = new EvolutionTree(new[] { Resources.evos_rby }, GameVersion.RBY, PersonalTable.Y, MaxSpeciesID_1);
|
||||
Evolves1 = new EvolutionTree(new[] { Util.getBinaryResource("evos_rby.pkl") }, GameVersion.RBY, PersonalTable.Y, MaxSpeciesID_1);
|
||||
FixPersonalTableY();
|
||||
}
|
||||
// Gen 2
|
||||
|
@ -652,7 +737,7 @@ namespace PKHeX.Core
|
|||
MarkEncountersGeneration(ref StaticGS, 2);
|
||||
MarkEncountersGeneration(ref StaticC, 2);
|
||||
MarkEncountersGeneration(ref StaticGSC, 2);
|
||||
Evolves2 = new EvolutionTree(new[] { Resources.evos_gsc }, GameVersion.GSC, PersonalTable.C, MaxSpeciesID_2);
|
||||
Evolves2 = new EvolutionTree(new[] { Util.getBinaryResource("evos_gsc.pkl") }, GameVersion.GSC, PersonalTable.C, MaxSpeciesID_2);
|
||||
}
|
||||
// Gen3
|
||||
{
|
||||
|
@ -685,15 +770,15 @@ namespace PKHeX.Core
|
|||
SlotsFR = addExtraTableSlots(FR_Slots, SlotsFRLGAlt);
|
||||
SlotsLG = addExtraTableSlots(LG_Slots, SlotsFRLGAlt);
|
||||
|
||||
Evolves3 = new EvolutionTree(new[] { Resources.evos_g3 }, GameVersion.RS, PersonalTable.RS, MaxSpeciesID_3);
|
||||
Evolves3 = new EvolutionTree(new[] { Util.getBinaryResource("evos_g3.pkl") }, GameVersion.RS, PersonalTable.RS, MaxSpeciesID_3);
|
||||
|
||||
// Update Personal Entries with TM/Tutor Data
|
||||
var TMHM = Data.unpackMini(Resources.hmtm_g3, "g3");
|
||||
var TMHM = Data.unpackMini(Util.getBinaryResource("hmtm_g3.pkl"), "g3");
|
||||
for (int i = 0; i <= MaxSpeciesID_3; i++)
|
||||
PersonalTable.E[i].AddTMHM(TMHM[i]);
|
||||
// Tutors g3 contains tutor compatiblity data extracted from emerald,
|
||||
// fire red and leaf green tutors data is a subset of emerald data
|
||||
var tutors = Data.unpackMini(Resources.tutors_g3, "g3");
|
||||
var tutors = Data.unpackMini(Util.getBinaryResource("tutors_g3.pkl"), "g3");
|
||||
for (int i = 0; i <= MaxSpeciesID_3; i++)
|
||||
PersonalTable.E[i].AddTypeTutors(tutors[i]);
|
||||
}
|
||||
|
@ -713,8 +798,8 @@ namespace PKHeX.Core
|
|||
var SS_Slots = getEncounterTables(GameVersion.SS);
|
||||
var DP_Trophy = EncounterArea.getTrophyArea(TrophyDP, new[] {16, 18});
|
||||
var Pt_Trophy = EncounterArea.getTrophyArea(TrophyPt, new[] {22, 22});
|
||||
var HG_Headbutt_Slots = EncounterArea.getArray4HGSS_Headbutt(Data.unpackMini(Resources.encunters_hb_hg, "hg"));
|
||||
var SS_Headbutt_Slots = EncounterArea.getArray4HGSS_Headbutt(Data.unpackMini(Resources.encunters_hb_ss, "ss"));
|
||||
var HG_Headbutt_Slots = EncounterArea.getArray4HGSS_Headbutt(Data.unpackMini(Util.getBinaryResource("encunters_hb_hg.pkl"), "hg"));
|
||||
var SS_Headbutt_Slots = EncounterArea.getArray4HGSS_Headbutt(Data.unpackMini(Util.getBinaryResource("encunters_hb_ss.pkl"), "ss"));
|
||||
|
||||
var D_HoneyTrees_Slots = SlotsD_HoneyTree.Clone(HoneyTreesLocation);
|
||||
var P_HoneyTrees_Slots = SlotsP_HoneyTree.Clone(HoneyTreesLocation);
|
||||
|
@ -775,10 +860,10 @@ namespace PKHeX.Core
|
|||
MarkHGSSEncounterTypeSlots(ref SlotsHG);
|
||||
MarkHGSSEncounterTypeSlots(ref SlotsSS);
|
||||
|
||||
Evolves4 = new EvolutionTree(new[] { Resources.evos_g4 }, GameVersion.DP, PersonalTable.DP, MaxSpeciesID_4);
|
||||
Evolves4 = new EvolutionTree(new[] { Util.getBinaryResource("evos_g4.pkl") }, GameVersion.DP, PersonalTable.DP, MaxSpeciesID_4);
|
||||
|
||||
// Update Personal Entries with Tutor Data
|
||||
var tutors = Data.unpackMini(Resources.tutors_g4, "g4");
|
||||
var tutors = Data.unpackMini(Util.getBinaryResource("tutors_g4.pkl"), "g4");
|
||||
for (int i = 0; i <= MaxSpeciesID_4; i++)
|
||||
PersonalTable.HGSS[i].AddTypeTutors(tutors[i]);
|
||||
}
|
||||
|
@ -811,7 +896,7 @@ namespace PKHeX.Core
|
|||
SlotsB2 = addExtraTableSlots(B2Slots, SlotsB2_Swarm, SlotsB2_HiddenGrotto);
|
||||
SlotsW2 = addExtraTableSlots(W2Slots, SlotsW2_Swarm, SlotsW2_HiddenGrotto);
|
||||
|
||||
Evolves5 = new EvolutionTree(new[] { Resources.evos_g5 }, GameVersion.BW, PersonalTable.BW, MaxSpeciesID_5);
|
||||
Evolves5 = new EvolutionTree(new[] { Util.getBinaryResource("evos_g5.pkl") }, GameVersion.BW, PersonalTable.BW, MaxSpeciesID_5);
|
||||
}
|
||||
// Gen 6
|
||||
{
|
||||
|
@ -832,7 +917,7 @@ namespace PKHeX.Core
|
|||
MarkG6AOSlots(ref SlotsA);
|
||||
MarkG6AOSlots(ref SlotsO);
|
||||
|
||||
Evolves6 = new EvolutionTree(Data.unpackMini(Resources.evos_ao, "ao"), GameVersion.ORAS, PersonalTable.AO, MaxSpeciesID_6);
|
||||
Evolves6 = new EvolutionTree(Data.unpackMini(Util.getBinaryResource("evos_ao.pkl"), "ao"), GameVersion.ORAS, PersonalTable.AO, MaxSpeciesID_6);
|
||||
}
|
||||
// Gen 7
|
||||
{
|
||||
|
@ -840,8 +925,8 @@ namespace PKHeX.Core
|
|||
StaticMN = getStaticEncounters(GameVersion.MN);
|
||||
var REG_SN = getEncounterTables(GameVersion.SN);
|
||||
var REG_MN = getEncounterTables(GameVersion.MN);
|
||||
var SOS_SN = getEncounterTables(Resources.encounter_sn_sos, "sm");
|
||||
var SOS_MN = getEncounterTables(Resources.encounter_mn_sos, "sm");
|
||||
var SOS_SN = getEncounterTables(Util.getBinaryResource("encounter_sn_sos.pkl"), "sm");
|
||||
var SOS_MN = getEncounterTables(Util.getBinaryResource("encounter_mn_sos.pkl"), "sm");
|
||||
MarkG7REGSlots(ref REG_SN);
|
||||
MarkG7REGSlots(ref REG_MN);
|
||||
MarkG7SMSlots(ref SOS_SN);
|
||||
|
@ -849,7 +934,7 @@ namespace PKHeX.Core
|
|||
SlotsSN = addExtraTableSlots(REG_SN, SOS_SN, Encounter_Pelago_SM, Encounter_Pelago_SN);
|
||||
SlotsMN = addExtraTableSlots(REG_MN, SOS_MN, Encounter_Pelago_SM, Encounter_Pelago_MN);
|
||||
|
||||
Evolves7 = new EvolutionTree(Data.unpackMini(Resources.evos_sm, "sm"), GameVersion.SM, PersonalTable.SM, MaxSpeciesID_7);
|
||||
Evolves7 = new EvolutionTree(Data.unpackMini(Util.getBinaryResource("evos_sm.pkl"), "sm"), GameVersion.SM, PersonalTable.SM, MaxSpeciesID_7);
|
||||
}
|
||||
}
|
||||
|
218
PKHeX.Core/PKHeX.Core.csproj
Normal file
218
PKHeX.Core/PKHeX.Core.csproj
Normal file
|
@ -0,0 +1,218 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard1.3</TargetFramework>
|
||||
<Description>Pokémon C# Class Library</Description>
|
||||
<Company>Project Pokémon</Company>
|
||||
<Copyright>Kaphotics</Copyright>
|
||||
<NeutralLanguage>en</NeutralLanguage>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Resources\byte\eggmove_ao.pkl" />
|
||||
<None Remove="Resources\byte\eggmove_bw.pkl" />
|
||||
<None Remove="Resources\byte\eggmove_c.pkl" />
|
||||
<None Remove="Resources\byte\eggmove_dppt.pkl" />
|
||||
<None Remove="Resources\byte\eggmove_gs.pkl" />
|
||||
<None Remove="Resources\byte\eggmove_hgss.pkl" />
|
||||
<None Remove="Resources\byte\eggmove_rs.pkl" />
|
||||
<None Remove="Resources\byte\eggmove_sm.pkl" />
|
||||
<None Remove="Resources\byte\eggmove_xy.pkl" />
|
||||
<None Remove="Resources\byte\encounter_a.pkl" />
|
||||
<None Remove="Resources\byte\encounter_b.pkl" />
|
||||
<None Remove="Resources\byte\encounter_b2.pkl" />
|
||||
<None Remove="Resources\byte\encounter_blue.pkl" />
|
||||
<None Remove="Resources\byte\encounter_crystal.pkl" />
|
||||
<None Remove="Resources\byte\encounter_crystal_h.pkl" />
|
||||
<None Remove="Resources\byte\encounter_d.pkl" />
|
||||
<None Remove="Resources\byte\encounter_e.pkl" />
|
||||
<None Remove="Resources\byte\encounter_fr.pkl" />
|
||||
<None Remove="Resources\byte\encounter_gold.pkl" />
|
||||
<None Remove="Resources\byte\encounter_gold_h.pkl" />
|
||||
<None Remove="Resources\byte\encounter_gsc_f.pkl" />
|
||||
<None Remove="Resources\byte\encounter_hg.pkl" />
|
||||
<None Remove="Resources\byte\encounter_lg.pkl" />
|
||||
<None Remove="Resources\byte\encounter_mn.pkl" />
|
||||
<None Remove="Resources\byte\encounter_mn_sos.pkl" />
|
||||
<None Remove="Resources\byte\encounter_o.pkl" />
|
||||
<None Remove="Resources\byte\encounter_p.pkl" />
|
||||
<None Remove="Resources\byte\encounter_pt.pkl" />
|
||||
<None Remove="Resources\byte\encounter_r.pkl" />
|
||||
<None Remove="Resources\byte\encounter_rb_f.pkl" />
|
||||
<None Remove="Resources\byte\encounter_red.pkl" />
|
||||
<None Remove="Resources\byte\encounter_s.pkl" />
|
||||
<None Remove="Resources\byte\encounter_silver.pkl" />
|
||||
<None Remove="Resources\byte\encounter_silver_h.pkl" />
|
||||
<None Remove="Resources\byte\encounter_sn.pkl" />
|
||||
<None Remove="Resources\byte\encounter_sn_sos.pkl" />
|
||||
<None Remove="Resources\byte\encounter_ss.pkl" />
|
||||
<None Remove="Resources\byte\encounter_w.pkl" />
|
||||
<None Remove="Resources\byte\encounter_w2.pkl" />
|
||||
<None Remove="Resources\byte\encounter_x.pkl" />
|
||||
<None Remove="Resources\byte\encounter_y.pkl" />
|
||||
<None Remove="Resources\byte\encounter_yellow.pkl" />
|
||||
<None Remove="Resources\byte\encounter_yellow_f.pkl" />
|
||||
<None Remove="Resources\byte\encunters_hb_hg.pkl" />
|
||||
<None Remove="Resources\byte\encunters_hb_ss.pkl" />
|
||||
<None Remove="Resources\byte\evos_ao.pkl" />
|
||||
<None Remove="Resources\byte\evos_g3.pkl" />
|
||||
<None Remove="Resources\byte\evos_g4.pkl" />
|
||||
<None Remove="Resources\byte\evos_g5.pkl" />
|
||||
<None Remove="Resources\byte\evos_gsc.pkl" />
|
||||
<None Remove="Resources\byte\evos_rby.pkl" />
|
||||
<None Remove="Resources\byte\evos_sm.pkl" />
|
||||
<None Remove="Resources\byte\hmtm_g3.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_ao.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_b2w2.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_bw.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_c.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_dp.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_e.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_fr.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_gs.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_hgss.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_lg.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_pt.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_rb.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_rs.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_sm.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_xy.pkl" />
|
||||
<None Remove="Resources\byte\lvlmove_y.pkl" />
|
||||
<None Remove="Resources\byte\pcd.pkl" />
|
||||
<None Remove="Resources\byte\personal_ao" />
|
||||
<None Remove="Resources\byte\personal_b2w2" />
|
||||
<None Remove="Resources\byte\personal_bw" />
|
||||
<None Remove="Resources\byte\personal_c" />
|
||||
<None Remove="Resources\byte\personal_dp" />
|
||||
<None Remove="Resources\byte\personal_e" />
|
||||
<None Remove="Resources\byte\personal_fr" />
|
||||
<None Remove="Resources\byte\personal_gs" />
|
||||
<None Remove="Resources\byte\personal_hgss" />
|
||||
<None Remove="Resources\byte\personal_lg" />
|
||||
<None Remove="Resources\byte\personal_pt" />
|
||||
<None Remove="Resources\byte\personal_rb" />
|
||||
<None Remove="Resources\byte\personal_rs" />
|
||||
<None Remove="Resources\byte\personal_sm" />
|
||||
<None Remove="Resources\byte\personal_xy" />
|
||||
<None Remove="Resources\byte\personal_y" />
|
||||
<None Remove="Resources\byte\pgf.pkl" />
|
||||
<None Remove="Resources\byte\tutors_g3.pkl" />
|
||||
<None Remove="Resources\byte\tutors_g4.pkl" />
|
||||
<None Remove="Resources\byte\wc6.pkl" />
|
||||
<None Remove="Resources\byte\wc6full.pkl" />
|
||||
<None Remove="Resources\byte\wc7.pkl" />
|
||||
<None Remove="Resources\byte\wc7full.pkl" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\byte\eggmove_ao.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\eggmove_bw.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\eggmove_c.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\eggmove_dppt.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\eggmove_gs.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\eggmove_hgss.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\eggmove_rs.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\eggmove_sm.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\eggmove_xy.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_a.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_b.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_b2.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_blue.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_crystal.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_crystal_h.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_d.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_e.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_fr.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_gold.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_gold_h.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_gsc_f.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_hg.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_lg.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_mn.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_mn_sos.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_o.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_p.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_pt.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_r.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_rb_f.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_red.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_s.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_silver.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_silver_h.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_sn.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_sn_sos.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_ss.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_w.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_w2.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_x.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_y.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_yellow.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encounter_yellow_f.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encunters_hb_hg.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\encunters_hb_ss.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\evos_ao.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\evos_g3.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\evos_g4.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\evos_g5.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\evos_gsc.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\evos_rby.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\evos_sm.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\hmtm_g3.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_ao.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_b2w2.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_bw.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_c.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_dp.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_e.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_fr.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_gs.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_hgss.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_lg.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_pt.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_rb.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_rs.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_sm.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_xy.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\lvlmove_y.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\pcd.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_ao" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_b2w2" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_bw" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_c" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_dp" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_e" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_fr" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_gs" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_hgss" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_lg" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_pt" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_rb" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_rs" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_sm" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_xy" />
|
||||
<EmbeddedResource Include="Resources\byte\personal_y" />
|
||||
<EmbeddedResource Include="Resources\byte\pgf.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\tutors_g3.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\tutors_g4.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\wc6.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\wc6full.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\wc7.pkl" />
|
||||
<EmbeddedResource Include="Resources\byte\wc7full.pkl" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace PKHeX.Core
|
||||
{
|
||||
|
@ -330,7 +331,7 @@ namespace PKHeX.Core
|
|||
/// </summary>
|
||||
/// <param name="t">Type of <see cref="PKM"/> instance desired.</param>
|
||||
/// <returns>New instance of a blank <see cref="PKM"/> object.</returns>
|
||||
public static PKM getBlank(Type t) => (PKM)Activator.CreateInstance(t, Enumerable.Repeat(null as PKM, t.GetConstructors()[0].GetParameters().Length).ToArray());
|
||||
public static PKM getBlank(Type t) => (PKM)Activator.CreateInstance(t, Enumerable.Repeat(null as PKM, t.GetTypeInfo().DeclaredConstructors.First().GetParameters().Length).ToArray());
|
||||
|
||||
public static void transferProperties(PKM source, PKM dest)
|
||||
{
|
|
@ -5,22 +5,22 @@ namespace PKHeX.Core
|
|||
{
|
||||
public class PersonalTable
|
||||
{
|
||||
public static readonly PersonalTable SM = new PersonalTable(Properties.Resources.personal_sm, GameVersion.SM);
|
||||
public static readonly PersonalTable AO = new PersonalTable(Properties.Resources.personal_ao, GameVersion.ORAS);
|
||||
public static readonly PersonalTable XY = new PersonalTable(Properties.Resources.personal_xy, GameVersion.XY);
|
||||
public static readonly PersonalTable B2W2 = new PersonalTable(Properties.Resources.personal_b2w2, GameVersion.B2W2);
|
||||
public static readonly PersonalTable BW = new PersonalTable(Properties.Resources.personal_bw, GameVersion.BW);
|
||||
public static readonly PersonalTable HGSS = new PersonalTable(Properties.Resources.personal_hgss, GameVersion.HGSS);
|
||||
public static readonly PersonalTable Pt = new PersonalTable(Properties.Resources.personal_pt, GameVersion.Pt);
|
||||
public static readonly PersonalTable DP = new PersonalTable(Properties.Resources.personal_dp, GameVersion.DP);
|
||||
public static readonly PersonalTable LG = new PersonalTable(Properties.Resources.personal_lg, GameVersion.LG);
|
||||
public static readonly PersonalTable FR = new PersonalTable(Properties.Resources.personal_fr, GameVersion.FR);
|
||||
public static readonly PersonalTable E = new PersonalTable(Properties.Resources.personal_e, GameVersion.E);
|
||||
public static readonly PersonalTable RS = new PersonalTable(Properties.Resources.personal_rs, GameVersion.RS);
|
||||
public static readonly PersonalTable C = new PersonalTable(Properties.Resources.personal_c, GameVersion.C);
|
||||
public static readonly PersonalTable GS = new PersonalTable(Properties.Resources.personal_c, GameVersion.GS);
|
||||
public static readonly PersonalTable RB = new PersonalTable(Properties.Resources.personal_rb, GameVersion.RBY);
|
||||
public static readonly PersonalTable Y = new PersonalTable(Properties.Resources.personal_y, GameVersion.RBY);
|
||||
public static readonly PersonalTable SM = new PersonalTable(Util.getBinaryResource("personal_sm"), GameVersion.SM);
|
||||
public static readonly PersonalTable AO = new PersonalTable(Util.getBinaryResource("personal_ao"), GameVersion.ORAS);
|
||||
public static readonly PersonalTable XY = new PersonalTable(Util.getBinaryResource("personal_xy"), GameVersion.XY);
|
||||
public static readonly PersonalTable B2W2 = new PersonalTable(Util.getBinaryResource("personal_b2w2"), GameVersion.B2W2);
|
||||
public static readonly PersonalTable BW = new PersonalTable(Util.getBinaryResource("personal_bw"), GameVersion.BW);
|
||||
public static readonly PersonalTable HGSS = new PersonalTable(Util.getBinaryResource("personal_hgss"), GameVersion.HGSS);
|
||||
public static readonly PersonalTable Pt = new PersonalTable(Util.getBinaryResource("personal_pt"), GameVersion.Pt);
|
||||
public static readonly PersonalTable DP = new PersonalTable(Util.getBinaryResource("personal_dp"), GameVersion.DP);
|
||||
public static readonly PersonalTable LG = new PersonalTable(Util.getBinaryResource("personal_lg"), GameVersion.LG);
|
||||
public static readonly PersonalTable FR = new PersonalTable(Util.getBinaryResource("personal_fr"), GameVersion.FR);
|
||||
public static readonly PersonalTable E = new PersonalTable(Util.getBinaryResource("personal_e"), GameVersion.E);
|
||||
public static readonly PersonalTable RS = new PersonalTable(Util.getBinaryResource("personal_rs"), GameVersion.RS);
|
||||
public static readonly PersonalTable C = new PersonalTable(Util.getBinaryResource("personal_c"), GameVersion.C);
|
||||
public static readonly PersonalTable GS = new PersonalTable(Util.getBinaryResource("personal_c"), GameVersion.GS);
|
||||
public static readonly PersonalTable RB = new PersonalTable(Util.getBinaryResource("personal_rb"), GameVersion.RBY);
|
||||
public static readonly PersonalTable Y = new PersonalTable(Util.getBinaryResource("personal_y"), GameVersion.RBY);
|
||||
|
||||
private static byte[][] splitBytes(byte[] data, int size)
|
||||
{
|
17866
PKHeX.Core/Properties/Resources.Designer.cs
generated
Normal file
17866
PKHeX.Core/Properties/Resources.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
1445
PKHeX.Core/Properties/Resources.resx
Normal file
1445
PKHeX.Core/Properties/Resources.resx
Normal file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue