Merge branch 'master'

This commit is contained in:
Evan Dixon 2016-09-04 08:33:45 -05:00
commit ee3b2aac54
42 changed files with 3080 additions and 224 deletions

View file

@ -175,8 +175,10 @@ namespace PKHeX
{
var evs = pk6.EVs;
int sum = evs.Sum();
if (pk6.IsEgg && sum > 0)
return new LegalityCheck(Severity.Invalid, "Eggs cannot receive EVs.");
if (sum == 0 && pk6.Stat_Level - pk6.Met_Level > 0)
return new LegalityCheck(Severity.Fishy, "All EVs are zero, but leveled above Met Level");
return new LegalityCheck(Severity.Fishy, "All EVs are zero, but leveled above Met Level.");
if (sum == 508)
return new LegalityCheck(Severity.Fishy, "2 EVs remaining.");
if (sum > 510)
@ -349,6 +351,8 @@ namespace PKHeX
return new LegalityCheck(Severity.Invalid, "Met Level does not match Wonder Card level.");
int lvl = pk6.CurrentLevel;
if (lvl > 1 && pk6.IsEgg)
return new LegalityCheck(Severity.Invalid, "Current level for an egg is invalid.");
if (lvl < pk6.Met_Level)
return new LegalityCheck(Severity.Invalid, "Current level is below met level.");
if ((pk6.WasEgg || EncounterMatch == null) && !Legal.getEvolutionValid(pk6) && pk6.Species != 350)
@ -365,6 +369,28 @@ namespace PKHeX
List<string> missingRibbons = new List<string>();
List<string> invalidRibbons = new List<string>();
if (pk6.IsEgg)
{
var RibbonNames = ReflectUtil.getPropertiesStartWithPrefix(pk6.GetType(), "Ribbon");
foreach (object RibbonValue in RibbonNames.Select(RibbonName => ReflectUtil.GetValue(pk6, RibbonName)))
{
if ((RibbonValue as int?) > 0)
return new LegalityCheck(Severity.Invalid, "Eggs should not have ribbons.");
if (RibbonValue as bool? == true)
return new LegalityCheck(Severity.Invalid, "Eggs should not have ribbons.");
}
var DistNames = ReflectUtil.getPropertiesStartWithPrefix(pk6.GetType(), "DistSuperTrain");
if (DistNames.Select(MissionName => ReflectUtil.GetValue(pk6, MissionName)).Any(Flag => Flag as bool? == true))
return new LegalityCheck(Severity.Invalid, "Distribution Super Training missions on Egg.");
var TrainNames = ReflectUtil.getPropertiesStartWithPrefix(pk6.GetType(), "SuperTrain");
if (TrainNames.Select(MissionName => ReflectUtil.GetValue(pk6, MissionName)).Any(Flag => Flag as bool? == true))
return new LegalityCheck(Severity.Fishy, "Super Training missions on Egg.");
return new LegalityCheck();
}
// Check Event Ribbons
bool[] EventRib =
@ -420,7 +446,13 @@ namespace PKHeX
invalidRibbons.Add("Battle Memory"); // Gen3/4 Battle
if (missingRibbons.Count + invalidRibbons.Count == 0)
{
var DistNames = ReflectUtil.getPropertiesStartWithPrefix(pk6.GetType(), "DistSuperTrain");
if (DistNames.Select(MissionName => ReflectUtil.GetValue(pk6, MissionName)).Any(Flag => Flag as bool? == true))
return new LegalityCheck(Severity.Fishy, "Distribution Super Training missions are not released.");
return new LegalityCheck(Severity.Valid, "All ribbons accounted for.");
}
string[] result = new string[2];
if (missingRibbons.Count > 0)
@ -820,6 +852,14 @@ namespace PKHeX
}
private LegalityCheck verifyMisc()
{
if (pk6.IsEgg)
{
if (new[] { pk6.Move1_PPUps, pk6.Move2_PPUps, pk6.Move3_PPUps, pk6.Move4_PPUps }.Any(ppup => ppup > 0))
return new LegalityCheck(Severity.Invalid, "Cannot apply PP Ups to an Egg.");
if (pk6.CNTs.Any(stat => stat > 0))
return new LegalityCheck(Severity.Invalid, "Cannot increase Contest Stats of an Egg.");
}
if (pk6.Gen6 && Encounter.Valid && EncounterType == typeof(WC6) ^ pk6.FatefulEncounter)
{
if (EncounterType == typeof(EncounterStatic) && pk6.Species == 386) // Deoxys Matched @ Sky Pillar

View file

@ -363,6 +363,8 @@
this.mnuLSave = new System.Windows.Forms.ToolStripMenuItem();
this.PB_Legal = new System.Windows.Forms.PictureBox();
this.L_UpdateAvailable = new System.Windows.Forms.LinkLabel();
this.L_MetTimeOfDay = new System.Windows.Forms.Label();
this.CB_MetTimeOfDay = new System.Windows.Forms.ComboBox();
this.tabMain.SuspendLayout();
this.Tab_Main.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.Label_IsShiny)).BeginInit();
@ -1042,6 +1044,8 @@
// Tab_Met
//
this.Tab_Met.AllowDrop = true;
this.Tab_Met.Controls.Add(this.L_MetTimeOfDay);
this.Tab_Met.Controls.Add(this.CB_MetTimeOfDay);
this.Tab_Met.Controls.Add(this.CHK_AsEgg);
this.Tab_Met.Controls.Add(this.CHK_Fateful);
this.Tab_Met.Controls.Add(this.GB_EggConditions);
@ -4607,6 +4611,33 @@
this.L_UpdateAvailable.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.L_UpdateAvailable.Visible = false;
//
// L_MetTimeOfDay
//
this.L_MetTimeOfDay.Location = new System.Drawing.Point(25, 165);
this.L_MetTimeOfDay.Name = "L_MetTimeOfDay";
this.L_MetTimeOfDay.Size = new System.Drawing.Size(77, 13);
this.L_MetTimeOfDay.TabIndex = 10;
this.L_MetTimeOfDay.Text = "Time of Day:";
this.L_MetTimeOfDay.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.L_MetTimeOfDay.Visible = false;
//
// CB_MetTimeOfDay
//
this.CB_MetTimeOfDay.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CB_MetTimeOfDay.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_MetTimeOfDay.DropDownWidth = 150;
this.CB_MetTimeOfDay.FormattingEnabled = true;
this.CB_MetTimeOfDay.Items.AddRange(new object[] {
"(None)",
"Morning",
"Day",
"Night"});
this.CB_MetTimeOfDay.Location = new System.Drawing.Point(105, 162);
this.CB_MetTimeOfDay.Name = "CB_MetTimeOfDay";
this.CB_MetTimeOfDay.Size = new System.Drawing.Size(122, 21);
this.CB_MetTimeOfDay.TabIndex = 11;
this.CB_MetTimeOfDay.Visible = false;
//
// Main
//
this.AllowDrop = true;
@ -5088,6 +5119,8 @@
private System.Windows.Forms.Button B_LinkInfo;
private System.Windows.Forms.Button B_CGearSkin;
private System.Windows.Forms.LinkLabel L_UpdateAvailable;
private System.Windows.Forms.Label L_MetTimeOfDay;
public System.Windows.Forms.ComboBox CB_MetTimeOfDay;
}
}

View file

@ -169,8 +169,8 @@ namespace PKHeX
public static string[] gendersymbols = { "♂", "♀", "-" };
public static string[] specieslist, movelist, itemlist, abilitylist, types, natures, forms,
memories, genloc, trainingbags, trainingstage, characteristics,
encountertypelist, gamelanguages, balllist, gamelist, pokeblocks, g3items = { };
public static string[] metRSEFRLG_00000 = { };
encountertypelist, gamelanguages, balllist, gamelist, pokeblocks, g3items, g2items, g1items = { };
public static string[] metGSC_00000, metRSEFRLG_00000 = { };
public static string[] metHGSS_00000, metHGSS_02000, metHGSS_03000 = { };
public static string[] metBW2_00000, metBW2_30000, metBW2_40000, metBW2_60000 = { };
public static string[] metXY_00000, metXY_30000, metXY_40000, metXY_60000 = { };
@ -412,9 +412,12 @@ namespace PKHeX
if (Set.Species < 0)
{ Util.Alert("Set data not found in clipboard."); return; }
if (DialogResult.Yes != Util.Prompt(MessageBoxButtons.YesNo, "Import this set?", Clipboard.GetText()))
if (DialogResult.Yes != Util.Prompt(MessageBoxButtons.YesNo, "Import this set?", Set.getText()))
{ return; }
if (Set.InvalidLines.Any())
Util.Alert("Invalid lines detected:", string.Join(Environment.NewLine, Set.InvalidLines));
// Set Species & Nickname
CB_Species.SelectedValue = Set.Species;
CHK_Nicknamed.Checked = Set.Nickname != null;
@ -870,24 +873,36 @@ namespace PKHeX
TB_AbilityNumber.Visible = SAV.Generation >= 6 && DEV_Ability.Enabled;
CB_Ability.Visible = !DEV_Ability.Enabled && SAV.Generation >= 3;
GB_ExtraBytes.Visible = SAV.Generation > 1;
GB_ExtraBytes.Visible = SAV.Generation > 2;
GB_Markings.Visible = SAV.Generation > 2;
Label_HeldItem.Visible = CB_HeldItem.Visible = SAV.Generation > 1;
Label_Total.Visible = TB_IVTotal.Visible = TB_EVTotal.Visible = L_Potential.Visible =
Label_HiddenPowerPrefix.Visible = CB_HPType.Visible = SAV.Generation > 1;
Label_CharacteristicPrefix.Visible = L_Characteristic.Visible = SAV.Generation > 1;
Label_Total.Visible = TB_IVTotal.Visible = TB_EVTotal.Visible = L_Potential.Visible = SAV.Generation > 2;
Label_HiddenPowerPrefix.Visible = CB_HPType.Visible = SAV.Generation > 1;
CB_HPType.Enabled = CB_Form.Enabled = SAV.Generation > 2;
Label_CharacteristicPrefix.Visible = L_Characteristic.Visible = SAV.Generation > 2;
Label_ContestStats.Visible = Label_Cool.Visible = Label_Tough.Visible = Label_Smart.Visible =
Label_Sheen.Visible = Label_Beauty.Visible = Label_Cute.Visible = TB_Cool.Visible = TB_Tough.Visible =
TB_Smart.Visible = TB_Sheen.Visible = TB_Beauty.Visible = TB_Cute.Visible = Label_Nature.Visible =
CB_Nature.Visible = Label_Language.Visible = CB_Language.Visible = Label_Ability.Visible =
Label_Friendship.Visible = Label_HatchCounter.Visible = TB_Friendship.Visible = BTN_RerollPID.Visible =
Label_PID.Visible = TB_PID.Visible = Label_SID.Visible = TB_SID.Visible = SAV.Generation >= 3;
BTN_RerollPID.Visible = Label_PID.Visible = TB_PID.Visible = Label_SID.Visible = TB_SID.Visible = SAV.Generation >= 3;
Label_Friendship.Visible = Label_HatchCounter.Visible = TB_Friendship.Visible = SAV.Generation >= 2;
// Met Tab
CHK_Fateful.Visible = Label_OriginGame.Visible = Label_Ball.Visible = Label_MetLevel.Visible =
CB_MetLocation.Visible = Label_MetLocation.Visible = SAV.Generation > 2 || (SAV.Version == GameVersion.GSC);
CB_GameOrigin.Visible = CB_Ball.Visible = TB_MetLevel.Visible = SAV.Generation > 2;
CHK_Fateful.Visible = Label_OriginGame.Visible = Label_Ball.Visible =
CB_Ball.Visible = CB_GameOrigin.Visible = SAV.Generation > 2;
Label_MetLocation.Visible = CB_MetLocation.Visible = Label_MetLevel.Visible = TB_MetLevel.Visible = Label_OTGender.Visible =
SAV.Generation > 1;
L_MetTimeOfDay.Visible = CB_MetTimeOfDay.Visible = SAV.Generation == 2;
if (SAV.Generation == 2)
{
var met_list = getLocationList(SAV.Version, SAV.Generation, egg: false);
CB_MetLocation.DisplayMember = "Text";
CB_MetLocation.ValueMember = "Value";
CB_MetLocation.DataSource = new BindingSource(met_list, null);
}
CHK_Infected.Visible = CHK_Cured.Visible = SAV.Generation >= 3;
@ -896,12 +911,11 @@ namespace PKHeX
CHK_IsEgg.Visible = Label_Gender.Visible = SAV.Generation > 1;
Label_OTGender.Visible = SAV.Generation > 1;
if (1 <= sav.Generation && sav.Generation <= 2)
if (sav.Generation == 1)
{
Label_SPD.Visible = TB_SPDEV.Visible = TB_SPDIV.Visible = Stat_SPD.Visible = false;
Label_SPA.Text = "Spc";
Label_SPA.Text = "Spc:";
TB_HPIV.ReadOnly = true;
MaskedTextBox[] evControls = { TB_SPAEV, TB_HPEV, TB_ATKEV, TB_DEFEV, TB_SPEEV, TB_SPDEV };
foreach (var ctrl in evControls)
@ -914,10 +928,28 @@ namespace PKHeX
ctrl.Location = new Point(173, ctrl.Location.Y);
Label_Stats.Location = new Point(168, Label_Stats.Location.Y);
}
else if (sav.Generation == 2)
{
Label_SPD.Visible = TB_SPDEV.Visible = TB_SPDIV.Visible = Stat_SPD.Visible = true;
Label_SPA.Text = "SpA:";
TB_SPDEV.ReadOnly = TB_SPDIV.ReadOnly = true;
TB_HPIV.ReadOnly = true;
MaskedTextBox[] evControls = { TB_SPAEV, TB_HPEV, TB_ATKEV, TB_DEFEV, TB_SPEEV, TB_SPDEV };
foreach (var ctrl in evControls)
{
ctrl.Mask = "00000";
ctrl.Size = new Size(37, 20);
}
Control[] statControls = { Stat_HP, Stat_ATK, Stat_DEF, Stat_SPA, Stat_SPD, Stat_SPE };
foreach (Control ctrl in statControls)
ctrl.Location = new Point(173, ctrl.Location.Y);
Label_Stats.Location = new Point(168, Label_Stats.Location.Y);
}
else
{
Label_SPD.Visible = TB_SPDEV.Visible = TB_SPDIV.Visible = Stat_SPD.Visible = true;
Label_SPA.Text = "SpA";
Label_SPA.Text = "SpA:";
TB_SPDEV.ReadOnly = TB_SPDIV.ReadOnly = false;
TB_HPIV.ReadOnly = false;
MaskedTextBox[] evControls = { TB_SPAEV, TB_HPEV, TB_ATKEV, TB_DEFEV, TB_SPEEV, TB_SPDEV };
foreach (var ctrl in evControls)
@ -941,6 +973,11 @@ namespace PKHeX
getPKMfromFields = preparePK1;
extraBytes = new byte[] {};
break;
case 2:
getFieldsfromPKM = populateFieldsPK2;
getPKMfromFields = preparePK2;
extraBytes = new byte[] { };
break;
case 3:
getFieldsfromPKM = populateFieldsPK3;
getPKMfromFields = preparePK3;
@ -970,7 +1007,7 @@ namespace PKHeX
bool init = fieldsInitialized;
fieldsInitialized = false;
populateFilteredDataSources();
populateFields((pkm.Format != SAV.Generation || SAV.Generation == 1) ? SAV.BlankPKM : pk);
populateFields((pkm.Format != SAV.Generation || SAV.Generation < 3) ? SAV.BlankPKM : pk);
fieldsInitialized |= init;
// SAV Specific Limits
@ -1046,7 +1083,10 @@ namespace PKHeX
// Past Generation strings
g3items = Util.getStringList("ItemsG3", "en");
g2items = Util.getStringList("ItemsG2", "en");
g1items = Util.getStringList("ItemsG1", "en");
metRSEFRLG_00000 = Util.getStringList("rsefrlg_00000", "en");
metGSC_00000 = Util.getStringList("gsc_00000", "en");
// Current Generation strings
string l = curlanguage;
@ -1077,7 +1117,14 @@ namespace PKHeX
puffs = Util.getStringList("puff", l);
}
// Gen4 Mail names not stored in future games. No clever solution like for HM's, so improvise.
for (int i = 137; i <= 148; i++)
itemlist[i] = $"Mail #{i-137+1} (G4)";
// Fix Item Names (Duplicate entries)
int len = itemlist[425].Length;
itemlist[426] = itemlist[425].Substring(0, len-1) + (char)(itemlist[425][len-1]+1) + " (G4)";
itemlist[427] = itemlist[425].Substring(0, len-1) + (char)(itemlist[425][len-1]+2) + " (G4)";
itemlist[456] += " (HG/SS)"; // S.S. Ticket
itemlist[736] += " (OR/AS)"; // S.S. Ticket
itemlist[463] += " (DPPt)"; // Storage Key
@ -1211,9 +1258,9 @@ namespace PKHeX
#region Met Locations
// Gen 2
{
var met_list = Util.getCBList(metRSEFRLG_00000, Enumerable.Range(0, 0x5F).ToArray());
met_list = Util.getOffsetCBList(met_list, metRSEFRLG_00000, 00000, new[] { 253, 254, 255 });
metGen2 = null;
var met_list = Util.getCBList(metGSC_00000, Enumerable.Range(0, 0x5F).ToArray());
met_list = Util.getOffsetCBList(met_list, metGSC_00000, 00000, new[] { 0x7E, 0x7F });
metGen2 = met_list;
}
// Gen 3
{
@ -1269,6 +1316,8 @@ namespace PKHeX
string[] items = itemlist;
if (SAV.Generation == 3)
items = g3items;
if (SAV.Generation == 2)
items = g2items;
ItemDataSource = Util.getCBList(items, (HaX ? Enumerable.Range(0, SAV.MaxItemID) : SAV.HeldItems.Select(i => (int)i)).ToArray());
CB_HeldItem.DataSource = new BindingSource(ItemDataSource.Where(i => i.Value <= SAV.MaxItemID).ToList(), null);
@ -1367,6 +1416,8 @@ namespace PKHeX
bool hasForms = SAV.Personal[species].HasFormes || new[] { 201, 664, 665, 414 }.Contains(species);
CB_Form.Enabled = CB_Form.Visible = Label_Form.Visible = hasForms;
if (SAV.Generation == 2)
CB_Form.Enabled = false;
if (!hasForms)
return;
@ -1408,7 +1459,7 @@ namespace PKHeX
bool isShiny = pkm.IsShiny;
// Set the Controls
BTN_Shinytize.Visible = BTN_Shinytize.Enabled = !isShiny && SAV.Generation > 2;
BTN_Shinytize.Visible = BTN_Shinytize.Enabled = !isShiny && SAV.Generation > 1;
Label_IsShiny.Visible = isShiny && SAV.Generation > 1;
// Refresh Markings (for Shiny Star if applicable)
@ -1705,6 +1756,17 @@ namespace PKHeX
if (SAV.Generation < 3)
{
TB_HPIV.Text = pkm.IV_HP.ToString("00");
TB_SPDIV.Text = TB_SPAIV.Text;
if (SAV.Generation == 2)
{
Label_Gender.Text = gendersymbols[pkm.Gender];
Label_Gender.ForeColor = pkm.Gender == 2
? Label_Species.ForeColor
: (pkm.Gender == 1 ? Color.Red : Color.Blue);
CB_Form.SelectedIndex = pkm.AltForm;
setIsShiny(null);
getQuickFiller(dragout);
}
}
CB_HPType.SelectedValue = pkm.HPType;
@ -1741,6 +1803,9 @@ namespace PKHeX
else if (sender == TB_SPAEV) pkm.EV_SPA = Util.ToInt32(TB_SPAEV.Text);
else if (sender == TB_SPDEV) pkm.EV_SPD = Util.ToInt32(TB_SPDEV.Text);
if (SAV.Generation < 3)
TB_SPDEV.Text = TB_SPAEV.Text;
int evtotal = pkm.EVs.Sum();
if (evtotal > 510) // Background turns Red
@ -2053,6 +2118,13 @@ namespace PKHeX
switch (Version)
{
case GameVersion.GSC:
case GameVersion.GS:
case GameVersion.C:
if (SaveFormat == 2)
return metGen2;
break;
case GameVersion.CXD:
if (SaveFormat == 3)
return metGen3;
@ -2253,6 +2325,8 @@ namespace PKHeX
{
CHK_Nicknamed.Checked = false;
TB_Friendship.Text = "1";
if (SAV.Generation == 2)
pkm.IsEgg = true;
// If we are an egg, it won't have a met location.
CHK_AsEgg.Checked = true;
@ -2266,6 +2340,9 @@ namespace PKHeX
if (!CHK_Nicknamed.Checked)
updateNickname(null, null);
if (SAV.Generation == 2)
pkm.IsEgg = false;
TB_Friendship.Text = SAV.Personal[Util.getIndex(CB_Species)].BaseFriendship.ToString();
if (CB_EggLocation.SelectedIndex == 0)
@ -2277,7 +2354,7 @@ namespace PKHeX
}
// Display hatch counter if it is an egg, Display Friendship if it is not.
Label_HatchCounter.Visible = CHK_IsEgg.Checked && SAV.Generation > 1;
Label_Friendship.Visible = !CHK_IsEgg.Checked && SAV.Generation > 2;
Label_Friendship.Visible = !CHK_IsEgg.Checked && SAV.Generation > 1;
// Update image to (not) show egg.
@ -2306,7 +2383,16 @@ namespace PKHeX
pkm.AltForm = CB_Form.SelectedIndex;
pkm.Version = Util.getIndex(CB_GameOrigin);
pkm.setShinyPID();
if (pkm.Format > 2)
pkm.setShinyPID();
else
{
TB_ATKIV.Text = "15";
TB_DEFIV.Text = "10";
TB_SPEIV.Text = "10";
TB_SPAIV.Text = "10";
updateIVs(null, null);
}
TB_PID.Text = pkm.PID.ToString("X8");
if (pkm.GenNumber < 6 && TB_EC.Visible)
@ -2907,7 +2993,7 @@ namespace PKHeX
{ SAV.setStoredSlot(SAV.BlankPKM, getPKXOffset(slot)); }
else return;
SlotPictureBoxes[slot].Image = null;
getQuickFiller(SlotPictureBoxes[slot], SAV.BlankPKM);
getSlotColor(slot, Properties.Resources.slotDel);
}
private void clickClone(object sender, EventArgs e)
@ -2944,7 +3030,7 @@ namespace PKHeX
{ SystemSounds.Asterisk.Play(); return; }
if (typeof (PK6) != pk.GetType())
{
Util.Alert($"Checking legality of {pk.GetType()} files is not supported.");
Util.Alert($"Checking legality of {pk.GetType().Name} files is not supported.");
return;
}
showLegality(pk as PK6, slot < 0, ModifierKeys == Keys.Control);
@ -3447,7 +3533,7 @@ namespace PKHeX
new SAV_PokedexORAS().ShowDialog();
else if (SAV.XY)
new SAV_PokedexXY().ShowDialog();
else if (SAV.RBY)
else if (SAV.RBY || SAV.GSC)
new SAV_SimplePokedex().ShowDialog();
}
private void B_OUTPasserby_Click(object sender, EventArgs e)

View file

@ -237,23 +237,6 @@
<metadata name="Label_IsShiny.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="Label_IsShiny.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHhJREFUKFNjQAf/BQQ6oEzc4L+QUOh/QcH///n5jaFCmAAoKfhPUPAuWKGg4BkM
xSCroJLYMbJT/gkIzMSmCCQOVYIAQIkzKIqAzoBKoQIk98EUvoNKIQDII2AFAgKrgGwlMA3iY3gIKAAK
GigXDIB8F3QxIgADAwC7NFU/mWb72QAAAABJRU5ErkJggg==
</value>
</data>
<data name="Label_IsShiny.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHhJREFUKFNjQAf/BQQ6oEzc4L+QUOh/QcH///n5jaFCmAAoKfhPUPAuWKGg4BkM
xSCroJLYMbJT/gkIzMSmCCQOVYIAQIkzKIqAzoBKoQIk98EUvoNKIQDII2AFAgKrgGwlMA3iY3gIKAAK
GigXDIB8F3QxIgADAwC7NFU/mWb72QAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="BTN_Shinytize.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -482,6 +465,347 @@
<metadata name="PB_WarnMove4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PB_WarnMove3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PB_WarnMove2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PB_WarnMove1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GB_RelearnMoves.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GB_CurrentMoves.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_EC.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BTN_RerollEC.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_EncryptionConstant.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Language.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MT_Form.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Ability.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_PID.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CHK_Nicknamed.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Gender.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Form.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CHK_Cured.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CHK_Infected.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_HeldItem.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_HeldItem.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Friendship.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Level.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_EXP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BTN_RerollPID.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_3DSReg.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_SubRegion.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Country.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_PKRSDays.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_PKRSStrain.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Nature.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_3DSRegion.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_SubRegion.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Country.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_PKRSdays.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_PKRS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CHK_IsEgg.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Language.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Form.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Ability.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Friendship.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Nature.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_CurLevel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Nickname.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Species.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_EXP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Species.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_HatchCounter.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_IsShiny.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="Label_IsShiny.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHhJREFUKFNjQAf/BQQ6oEzc4L+QUOh/QcH///n5jaFCmAAoKfhPUPAuWKGg4BkM
xSCroJLYMbJT/gkIzMSmCCQOVYIAQIkzKIqAzoBKoQIk98EUvoNKIQDII2AFAgKrgGwlMA3iY3gIKAAK
GigXDIB8F3QxIgADAwC7NFU/mWb72QAAAABJRU5ErkJggg==
</value>
</data>
<data name="Label_IsShiny.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHhJREFUKFNjQAf/BQQ6oEzc4L+QUOh/QcH///n5jaFCmAAoKfhPUPAuWKGg4BkM
xSCroJLYMbJT/gkIzMSmCCQOVYIAQIkzKIqAzoBKoQIk98EUvoNKIQDII2AFAgKrgGwlMA3iY3gIKAAK
GigXDIB8F3QxIgADAwC7NFU/mWb72QAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="BTN_Shinytize.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_PID.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_AbilityNumber.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MT_Level.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="DEV_Ability.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_EggLocation.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CAL_EggDate.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_EggDate.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_EggLocation.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Stat_SPE.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Stat_SPD.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Stat_SPA.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Stat_DEF.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Stat_ATK.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Stat_HP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_HPType.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CHK_HackedStats.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_CharacteristicPrefix.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Potential.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_IVTotal.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Characteristic.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Sheen.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Tough.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Smart.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Cute.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Beauty.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Cool.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_SPEIV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_SPDIV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_SPAIV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_DEFIV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_ATKIV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_HPIV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_ATKEV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_DEFEV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_SPEEV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_SPDEV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_SPAEV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_HPEV.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Sheen.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Tough.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Smart.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Cute.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Beauty.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Cool.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_ContestStats.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BTN_RandomEVs.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BTN_RandomIVs.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_HiddenPowerPrefix.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Stats.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_EVs.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_IVs.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_Total.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_SPE.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_SPD.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_SPA.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_DEF.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_ATK.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_HP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_EVTotal.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PB_WarnMove4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="PB_WarnMove4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1
@ -553,6 +877,30 @@
<metadata name="PB_WarnRelearn4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PB_WarnRelearn3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PB_WarnRelearn2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PB_WarnRelearn1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_RelearnMove4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_RelearnMove3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_RelearnMove2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_RelearnMove1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PB_WarnRelearn4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="PB_WarnRelearn4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1
@ -675,6 +1023,48 @@
<metadata name="CB_Move1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_PP4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_PP3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_PP2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_PP1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_CurPP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_PPups.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_PPu4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_PPu3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_PPu2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Move4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_PPu1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Move3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Move2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Move1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_EC.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -687,9 +1077,27 @@
<metadata name="Label_PrevOT.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_CTGender.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_OTt2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_PrevOT.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BTN_RerollEC.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PB_MarkPentagon.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PB_MarkCured.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PB_MarkShiny.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="PB_Mark6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
@ -847,6 +1255,33 @@
<metadata name="CB_ExtraBytes.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_ExtraByte.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_ExtraBytes.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_OTGender.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_OT.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_SID.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_TID.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_OT.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_SID.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_TID.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label_OTGender.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -883,6 +1318,108 @@
<metadata name="PAN_Box.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_BoxRight.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_BoxLeft.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_BoxSelect.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PAN_Box.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx30.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx29.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx28.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx27.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx26.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx25.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx24.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx23.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx22.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx21.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx20.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx19.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx18.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx17.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx16.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx15.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx14.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx13.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx12.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx11.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx10.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx9.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx8.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx7.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx6.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bpkx30.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -988,6 +1525,42 @@
<metadata name="PAN_BattleBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_ReadOnlyPBB.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_BattleBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Party.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PAN_Party.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PAN_BattleBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PB_Locked.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bbpkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bbpkx2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bbpkx3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bbpkx4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bbpkx5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="bbpkx6.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="PAN_BattleBox.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAG8AAACgCAYAAAACezIBAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
@ -1101,6 +1674,24 @@
<metadata name="PAN_Party.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ppkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ppkx2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ppkx3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ppkx4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ppkx5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ppkx6.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="PAN_Party.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAG8AAACgCAYAAAACezIBAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
@ -1171,6 +1762,54 @@
<metadata name="GB_Daycare.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GB_GTS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GB_Fused.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_ReadOnlyOther.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GB_SUBE.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GB_Daycare.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_XP2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_XP1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Daycare2XP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Daycare1XP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_DC2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_DC1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_DaycareSeed.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_RNGSeed.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dcpkx2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dcpkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="DayCare_HasEgg.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_XP2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -1210,12 +1849,18 @@
<metadata name="gtspkx.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="gtspkx.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GB_Fused.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="fusedpkx.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="fusedpkx.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_ReadOnlyOther.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -1225,6 +1870,36 @@
<metadata name="subepkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="subepkx1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Secure2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Secure2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Secure1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Secure1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_JPEG.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_GameSync.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_GameSync.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_SaveBoxBin.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_VerifyCHK.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Secure2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -1258,6 +1933,57 @@
<metadata name="FLP_SAVtools.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="FLP_SAVtools.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenTrainerInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenItemPouch.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenBoxLayout.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenWondercards.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenOPowers.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenEventFlags.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenPokedex.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_LinkInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenBerryField.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_Pokeblocks.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenSecretBase.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenPokepuffs.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenSuperTraining.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenHallofFame.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OUTPasserby.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_CGearSkin.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenTrainerInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

143
PKHeX/MainWindow/MainPK2.cs Normal file
View file

@ -0,0 +1,143 @@
using System;
using System.Drawing;
namespace PKHeX
{
public partial class Main
{
private void populateFieldsPK2()
{
PK2 pk2 = pkm as PK2;
if (pk2 == null)
return;
// Do first
pk2.Stat_Level = PKX.getLevel(pk2.Species, pk2.EXP);
if (pk2.Stat_Level == 100)
pk2.EXP = PKX.getEXP(pk2.Stat_Level, pk2.Species);
CB_Species.SelectedValue = pk2.Species;
TB_Level.Text = pk2.Stat_Level.ToString();
TB_EXP.Text = pk2.EXP.ToString();
CB_HeldItem.SelectedValue = pk2.HeldItem;
CB_Form.SelectedIndex = pk2.AltForm;
CHK_IsEgg.Checked = pk2.IsEgg;
TB_Friendship.Text = pk2.CurrentFriendship.ToString();
TB_MetLevel.Text = pk2.Met_Level.ToString();
CB_MetLocation.SelectedValue = pk2.Met_Location;
CB_MetTimeOfDay.SelectedIndex = pk2.Met_TimeOfDay;
// Load rest
TB_TID.Text = pk2.TID.ToString("00000");
CHK_Nicknamed.Checked = pk2.IsNicknamed;
TB_Nickname.Text = pk2.Nickname;
TB_OT.Text = pk2.OT_Name;
GB_OT.BackgroundImage = null;
Label_OTGender.Text = gendersymbols[pk2.OT_Gender];
Label_OTGender.ForeColor = pk2.OT_Gender == 1 ? Color.Red : Color.Blue;
// Reset Label and ComboBox visibility, as well as non-data checked status.
Label_PKRS.Visible = false;
Label_PKRSdays.Visible = false;
TB_HPIV.Text = pk2.IV_HP.ToString();
TB_ATKIV.Text = pk2.IV_ATK.ToString();
TB_DEFIV.Text = pk2.IV_DEF.ToString();
TB_SPEIV.Text = pk2.IV_SPE.ToString();
TB_SPAIV.Text = pk2.IV_SPA.ToString();
TB_HPEV.Text = pk2.EV_HP.ToString();
TB_ATKEV.Text = pk2.EV_ATK.ToString();
TB_DEFEV.Text = pk2.EV_DEF.ToString();
TB_SPEEV.Text = pk2.EV_SPE.ToString();
TB_SPAEV.Text = pk2.EV_SPA.ToString();
CB_Move1.SelectedValue = pk2.Move1;
CB_Move2.SelectedValue = pk2.Move2;
CB_Move3.SelectedValue = pk2.Move3;
CB_Move4.SelectedValue = pk2.Move4;
CB_PPu1.SelectedIndex = pk2.Move1_PPUps;
CB_PPu2.SelectedIndex = pk2.Move2_PPUps;
CB_PPu3.SelectedIndex = pk2.Move3_PPUps;
CB_PPu4.SelectedIndex = pk2.Move4_PPUps;
TB_PP1.Text = pk2.Move1_PP.ToString();
TB_PP2.Text = pk2.Move2_PP.ToString();
TB_PP3.Text = pk2.Move3_PP.ToString();
TB_PP4.Text = pk2.Move4_PP.ToString();
CB_Language.SelectedIndex = pk2.Japanese ? 0 : 1;
updateStats();
setIsShiny(null);
Label_Gender.Text = gendersymbols[pk2.Gender];
Label_Gender.ForeColor = pk2.Gender == 2 ? Label_Species.ForeColor : (pk2.Gender == 1 ? Color.Red : Color.Blue);
TB_EXP.Text = pk2.EXP.ToString();
}
private PKM preparePK2()
{
PK2 pk2 = pkm as PK2;
if (pk2 == null)
return null;
pk2.Species = Util.getIndex(CB_Species);
pk2.TID = Util.ToInt32(TB_TID.Text);
pk2.EXP = Util.ToUInt32(TB_EXP.Text);
pk2.HeldItem = Util.getIndex(CB_HeldItem);
pk2.IsEgg = CHK_IsEgg.Checked;
pk2.CurrentFriendship = Util.ToInt32(TB_Friendship.Text);
pk2.Met_Level = Util.ToInt32(TB_MetLevel.Text);
pk2.Met_Location = Util.getIndex(CB_MetLocation);
pk2.Met_TimeOfDay = CB_MetTimeOfDay.SelectedIndex;
pk2.EV_HP = Util.ToInt32(TB_HPEV.Text);
pk2.EV_ATK = Util.ToInt32(TB_ATKEV.Text);
pk2.EV_DEF = Util.ToInt32(TB_DEFEV.Text);
pk2.EV_SPE = Util.ToInt32(TB_SPEEV.Text);
pk2.EV_SPC = Util.ToInt32(TB_SPAEV.Text);
pk2.Nickname = TB_Nickname.Text;
pk2.Move1 = Util.getIndex(CB_Move1);
pk2.Move2 = Util.getIndex(CB_Move2);
pk2.Move3 = Util.getIndex(CB_Move3);
pk2.Move4 = Util.getIndex(CB_Move4);
pk2.Move1_PP = Util.getIndex(CB_Move1) > 0 ? Util.ToInt32(TB_PP1.Text) : 0;
pk2.Move2_PP = Util.getIndex(CB_Move2) > 0 ? Util.ToInt32(TB_PP2.Text) : 0;
pk2.Move3_PP = Util.getIndex(CB_Move3) > 0 ? Util.ToInt32(TB_PP3.Text) : 0;
pk2.Move4_PP = Util.getIndex(CB_Move4) > 0 ? Util.ToInt32(TB_PP4.Text) : 0;
pk2.Move1_PPUps = Util.getIndex(CB_Move1) > 0 ? CB_PPu1.SelectedIndex : 0;
pk2.Move2_PPUps = Util.getIndex(CB_Move2) > 0 ? CB_PPu2.SelectedIndex : 0;
pk2.Move3_PPUps = Util.getIndex(CB_Move3) > 0 ? CB_PPu3.SelectedIndex : 0;
pk2.Move4_PPUps = Util.getIndex(CB_Move4) > 0 ? CB_PPu4.SelectedIndex : 0;
pk2.IV_HP = Util.ToInt32(TB_HPIV.Text);
pk2.IV_ATK = Util.ToInt32(TB_ATKIV.Text);
pk2.IV_DEF = Util.ToInt32(TB_DEFIV.Text);
pk2.IV_SPE = Util.ToInt32(TB_SPEIV.Text);
pk2.IV_SPA = Util.ToInt32(TB_SPAIV.Text);
pk2.OT_Name = TB_OT.Text;
// Toss in Party Stats
Array.Resize(ref pk2.Data, pk2.SIZE_PARTY);
pk2.Stat_Level = Util.ToInt32(TB_Level.Text);
pk2.Stat_HPCurrent = Util.ToInt32(Stat_HP.Text);
pk2.Stat_HPMax = Util.ToInt32(Stat_HP.Text);
pk2.Stat_ATK = Util.ToInt32(Stat_ATK.Text);
pk2.Stat_DEF = Util.ToInt32(Stat_DEF.Text);
pk2.Stat_SPE = Util.ToInt32(Stat_SPE.Text);
pk2.Stat_SPA = Util.ToInt32(Stat_SPA.Text);
pk2.Stat_SPD = Util.ToInt32(Stat_SPD.Text);
if (HaX)
{
pk2.Stat_Level = (byte)Math.Min(Convert.ToInt32(MT_Level.Text), byte.MaxValue);
}
// Fix Moves if a slot is empty
pk2.FixMoves();
return pk2;
}
}
}

BIN
PKHeX/Misc/personal_gs Normal file

Binary file not shown.

View file

@ -101,6 +101,9 @@
<Compile Include="Legality\Tables3.cs" />
<Compile Include="Legality\Tables5.cs" />
<Compile Include="Legality\Tables4.cs" />
<Compile Include="MainWindow\MainPK2.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainWindow\MainPK1.cs">
<SubType>Form</SubType>
</Compile>
@ -121,6 +124,7 @@
<Compile Include="PersonalInfo\PersonalInfo.cs" />
<Compile Include="PersonalInfo\PersonalInfoB2W2.cs" />
<Compile Include="PersonalInfo\PersonalInfoBW.cs" />
<Compile Include="PersonalInfo\PersonalInfoG2.cs" />
<Compile Include="PersonalInfo\PersonalInfoG1.cs" />
<Compile Include="PersonalInfo\PersonalInfoG3.cs" />
<Compile Include="PersonalInfo\PersonalInfoG4.cs" />
@ -128,6 +132,7 @@
<Compile Include="PersonalInfo\PersonalInfoXY.cs" />
<Compile Include="PersonalInfo\PersonalTable.cs" />
<Compile Include="PKM\PK1.cs" />
<Compile Include="PKM\PK2.cs" />
<Compile Include="PKM\PKM.cs" />
<Compile Include="PKM\PKMConverter.cs" />
<Compile Include="PKM\ShowdownSet.cs" />
@ -147,6 +152,7 @@
<Compile Include="Saves\BlockInfo.cs" />
<Compile Include="Saves\BoxWallpaper.cs" />
<Compile Include="Saves\Inventory.cs" />
<Compile Include="Saves\SAV2.cs" />
<Compile Include="Saves\SAV1.cs" />
<Compile Include="Saves\SAV3.cs" />
<Compile Include="Saves\SAV4.cs" />
@ -451,6 +457,7 @@
<SubType>Designer</SubType>
</EmbeddedResource>
<None Include="app.config" />
<None Include="Misc\personal_gs" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@ -500,9 +507,11 @@
<None Include="Resources\byte\lvlmove_xy.pkl" />
<None Include="Resources\byte\personal_b2w2" />
<None Include="Resources\byte\personal_bw" />
<None Include="Resources\byte\personal_c" />
<None Include="Resources\byte\personal_dp" />
<None Include="Resources\byte\personal_e" />
<None Include="Resources\byte\personal_fr" />
<None Include="Resources\byte\personal_gs" />
<None Include="Resources\byte\personal_hgss" />
<None Include="Resources\byte\personal_lg" />
<None Include="Resources\byte\personal_pt" />
@ -2769,6 +2778,16 @@
<ItemGroup>
<None Include="Resources\text\version.txt" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\text\gen3\text_gsc_00000_en.txt" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\text\gen3\text_ItemsG1_en.txt" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\text\gen3\text_ItemsG2_en.txt" />
<None Include="Resources\img\Pokemon Sprites\172_1.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -100,7 +100,7 @@ namespace PKHeX
get
{
string spName = PKX.getSpeciesName(Species, Japanese ? 1 : 2).ToUpper();
return !nick.SequenceEqual(
return !nick.SequenceEqual(
PKX.setG1Str(spName, Japanese)
.Concat(Enumerable.Repeat((byte) 0x50, StringLength - spName.Length - 1)));
}
@ -254,16 +254,15 @@ namespace PKHeX
public class PokemonList1
{
internal const int CAPACITY_DAYCARE = 1;
internal const int CAPACITY_PARTY = 6;
internal const int CAPACITY_STORED = 20;
internal const int CAPACITY_STORED_JP = 30;
private const int CAPACITY_DAYCARE = 1;
private const int CAPACITY_PARTY = 6;
private const int CAPACITY_STORED = 20;
private const int CAPACITY_STORED_JP = 30;
private readonly bool Japanese;
private int StringLength => Japanese ? PK1.STRLEN_J : PK1.STRLEN_U;
internal static readonly byte[] EMPTY_LIST = { 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50 };
public enum CapacityType
{
Daycare = CAPACITY_DAYCARE,
@ -340,11 +339,6 @@ namespace PKHeX
set { Data[0] = value > Capacity ? Capacity : value; }
}
public int GetCapacity()
{
return Capacity;
}
public readonly PK1[] Pokemon;
public PK1 this[int i]

463
PKHeX/PKM/PK2.cs Normal file
View file

@ -0,0 +1,463 @@
using System;
using System.Linq;
namespace PKHeX
{
public class PK2 : PKM
{
// Internal use only
protected internal byte[] otname;
protected internal byte[] nick;
public byte[] OT_Name_Raw => (byte[])otname.Clone();
public byte[] Nickname_Raw => (byte[])nick.Clone();
public sealed override int SIZE_PARTY => PKX.SIZE_2PARTY;
public override int SIZE_STORED => PKX.SIZE_2STORED;
internal const int STRLEN_J = 6;
internal const int STRLEN_U = 11;
private int StringLength => Japanese ? STRLEN_J : STRLEN_U;
public override int Format => 2;
public bool Japanese => otname.Length == STRLEN_J;
public override string FileName => $"{Species.ToString("000")} - {Nickname} - {OT_Name}.{Extension}";
public PK2(byte[] decryptedData = null, string ident = null, bool jp = false)
{
Data = (byte[])(decryptedData ?? new byte[SIZE_PARTY]).Clone();
Identifier = ident;
if (Data.Length != SIZE_PARTY)
Array.Resize(ref Data, SIZE_PARTY);
int strLen = jp ? STRLEN_J : STRLEN_U;
otname = Enumerable.Repeat((byte) 0x50, strLen).ToArray();
nick = Enumerable.Repeat((byte) 0x50, strLen).ToArray();
IsEgg = false; // Egg data stored in Pokemon List.
}
public override PKM Clone()
{
PK2 new_pk2 = new PK2(Data, Identifier, Japanese);
Array.Copy(otname, 0, new_pk2.otname, 0, otname.Length);
Array.Copy(nick, 0, new_pk2.nick, 0, nick.Length);
new_pk2.IsEgg = IsEgg;
return new_pk2;
}
public override string Nickname
{
get { return PKX.getG1Str(nick, Japanese); }
set
{
byte[] strdata = PKX.setG1Str(value, Japanese);
if (strdata.Length > StringLength)
throw new ArgumentOutOfRangeException($"Nickname {value} too long for given PK2");
if (nick.Any(b => b == 0) && nick[StringLength - 1] == 0x50 && Array.FindIndex(nick, b => b == 0) == strdata.Length - 1) // Handle JP Mew event with grace
{
int firstInd = Array.FindIndex(nick, b => b == 0);
for (int i = firstInd; i < StringLength - 1; i++)
if (nick[i] != 0)
break;
strdata = strdata.Take(strdata.Length - 1).ToArray();
}
strdata.CopyTo(nick, 0);
}
}
public override string OT_Name
{
get { return PKX.getG1Str(otname, Japanese); }
set
{
byte[] strdata = PKX.setG1Str(value, Japanese);
if (strdata.Length > StringLength)
throw new ArgumentOutOfRangeException($"OT Name {value} too long for given PK1");
if (otname.Any(b => b == 0) && otname[StringLength - 1] == 0x50 && Array.FindIndex(otname, b => b == 0) == strdata.Length - 1) // Handle JP Mew event with grace
{
int firstInd = Array.FindIndex(otname, b => b == 0);
for (int i = firstInd; i < StringLength - 1; i++)
if (otname[i] != 0)
break;
strdata = strdata.Take(strdata.Length - 1).ToArray();
}
strdata.CopyTo(otname, 0);
}
}
public override byte[] Encrypt()
{
// Oh god this is such total abuse of what this method is meant to do
// Please forgive me
return new PokemonList2(this).GetBytes();
}
// Please forgive me.
public override byte[] EncryptedPartyData => Encrypt().ToArray();
public override byte[] EncryptedBoxData => Encrypt().ToArray();
public override byte[] DecryptedBoxData => Encrypt().ToArray();
public override byte[] DecryptedPartyData => Encrypt().ToArray();
public override bool IsNicknamed
{
get
{
string spName = PKX.getSpeciesName(Species, Japanese ? 1 : 2).ToUpper();
return !nick.SequenceEqual(
PKX.setG1Str(spName, Japanese)
.Concat(Enumerable.Repeat((byte) 0x50, StringLength - spName.Length - 1)));
}
set { }
}
public void setNotNicknamed()
{
string spName = PKX.getSpeciesName(Species, Japanese ? 1 : 2).ToUpper();
nick = PKX.setG1Str(spName, Japanese).Concat(Enumerable.Repeat((byte)0x50, StringLength - spName.Length - 1)).ToArray();
}
#region Stored Attributes
public override int Species
{
get { return Data[0]; }
set
{
Data[0] = (byte)value;
}
}
public override int HeldItem { get { return Data[0x1]; } set { Data[0x1] = (byte)value; } }
public override int Move1 { get { return Data[2]; } set { Data[2] = (byte) value; } }
public override int Move2 { get { return Data[3]; } set { Data[3] = (byte)value; } }
public override int Move3 { get { return Data[4]; } set { Data[4] = (byte)value; } }
public override int Move4 { get { return Data[5]; } set { Data[5] = (byte)value; } }
public override int TID { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 6)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 6); } }
public override uint EXP
{
get { return (Util.SwapEndianness(BitConverter.ToUInt32(Data, 8)) >> 8) & 0x00FFFFFF; }
set { Array.Copy(BitConverter.GetBytes(Util.SwapEndianness((value << 8) & 0xFFFFFF00)), 0, Data, 8, 3); }
}
public override int EV_HP { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0xB)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0xB); } }
public override int EV_ATK { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0xD)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0xD); } }
public override int EV_DEF { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0xF)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0xF); } }
public override int EV_SPE { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x11)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x11); } }
public int EV_SPC { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x13)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x13); } }
public override int EV_SPA { get { return EV_SPC; } set { EV_SPC = value; } }
public override int EV_SPD { get { return EV_SPC; } set { } }
public ushort DV16 { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x15)); } set { BitConverter.GetBytes(Util.SwapEndianness(value)).CopyTo(Data, 0x15); } }
public override int IV_HP { get { return ((IV_ATK & 1) << 3) | ((IV_DEF & 1) << 2) | ((IV_SPE & 1) << 1) | ((IV_SPC & 1) << 0); } set { } }
public override int IV_ATK { get { return (DV16 >> 12) & 0xF; } set { DV16 = (ushort)((DV16 & ~(0xF << 12)) | (ushort)((value > 0xF ? 0xF : value) << 12)); } }
public override int IV_DEF { get { return (DV16 >> 8) & 0xF; } set { DV16 = (ushort)((DV16 & ~(0xF << 8)) | (ushort)((value > 0xF ? 0xF : value) << 8)); } }
public override int IV_SPE { get { return (DV16 >> 4) & 0xF; } set { DV16 = (ushort)((DV16 & ~(0xF << 4)) | (ushort)((value > 0xF ? 0xF : value) << 4)); } }
public int IV_SPC { get { return (DV16 >> 0) & 0xF; } set { DV16 = (ushort)((DV16 & ~(0xF << 0)) | (ushort)((value > 0xF ? 0xF : value) << 0)); } }
public override int IV_SPA { get { return IV_SPC; } set { IV_SPC = value; } }
public override int IV_SPD { get { return IV_SPC; } set { } }
public override int Move1_PP { get { return Data[0x17] & 0x3F; } set { Data[0x17] = (byte)((Data[0x17] & 0xC0) | (value & 0x3F)); } }
public override int Move2_PP { get { return Data[0x18] & 0x3F; } set { Data[0x18] = (byte)((Data[0x18] & 0xC0) | (value & 0x3F)); } }
public override int Move3_PP { get { return Data[0x19] & 0x3F; } set { Data[0x19] = (byte)((Data[0x19] & 0xC0) | (value & 0x3F)); } }
public override int Move4_PP { get { return Data[0x1A] & 0x3F; } set { Data[0x1A] = (byte)((Data[0x1A] & 0xC0) | (value & 0x3F)); } }
public override int Move1_PPUps { get { return (Data[0x17] & 0xC0) >> 6; } set { Data[0x17] = (byte)((Data[0x17] & 0x3F) | ((value & 0x3) << 6)); } }
public override int Move2_PPUps { get { return (Data[0x18] & 0xC0) >> 6; } set { Data[0x18] = (byte)((Data[0x18] & 0x3F) | ((value & 0x3) << 6)); } }
public override int Move3_PPUps { get { return (Data[0x19] & 0xC0) >> 6; } set { Data[0x19] = (byte)((Data[0x19] & 0x3F) | ((value & 0x3) << 6)); } }
public override int Move4_PPUps { get { return (Data[0x1A] & 0xC0) >> 6; } set { Data[0x1A] = (byte)((Data[0x1A] & 0x3F) | ((value & 0x3) << 6)); } }
public override int CurrentFriendship { get { return Data[0x1B]; } set { Data[0x1B] = (byte) value; } }
private byte PKRS { get { return Data[0x1C]; } set { Data[0x1C] = value; } }
public override int PKRS_Days { get { return PKRS & 0xF; } set { PKRS = (byte)(PKRS & ~0xF | value); } }
public override int PKRS_Strain { get { return PKRS >> 4; } set { PKRS = (byte)(PKRS & 0xF | value << 4); } }
// Crystal only Caught Data
private int CaughtData { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x1D)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x1D); } }
public int Met_TimeOfDay { get { return (CaughtData >> 14) & 0x3; } set { CaughtData = (CaughtData & 0x3FFF) | ((value & 0x3) << 14); } }
public override int Met_Level { get { return (CaughtData >> 8) & 0x3F; } set { CaughtData = (CaughtData & 0xC0FF) | ((value & 0x3F) << 8); } }
public override int OT_Gender { get { return (CaughtData >> 7) & 1; } set { CaughtData = (CaughtData & 0xFFEF) | ((value & 1) << 7); } }
public override int Met_Location { get { return CaughtData & 0x7F; } set { CaughtData = (CaughtData & 0xFF80) | (value & 0x7F); } }
public override int Stat_Level
{
get { return Data[0x1F]; }
set { Data[0x1F] = (byte)value; }
}
#endregion
#region Party Attributes
public int Status_Condition { get { return Data[0x20]; } set { Data[0x20] = (byte)value; } }
public override int Stat_HPCurrent { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x22)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x22); } }
public override int Stat_HPMax { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x24)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x24); } }
public override int Stat_ATK { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x26)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x26); } }
public override int Stat_DEF { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x28)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x28); } }
public override int Stat_SPE { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x2A)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x2A); } }
public override int Stat_SPA { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x2C)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x2C); } }
public override int Stat_SPD { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x2E)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x2E); } }
#endregion
public override ushort[] getStats(PersonalInfo p)
{
ushort[] Stats = new ushort[6];
for (int i = 0; i < Stats.Length; i++)
{
ushort L = (ushort)Stat_Level;
ushort B = (ushort)p.Stats[i];
ushort I = (ushort)IVs[i];
ushort E = // Fixed formula via http://www.smogon.com/ingame/guides/rby_gsc_stats
(ushort)Math.Floor(Math.Min(255, Math.Floor(Math.Sqrt(Math.Max(0, EVs[i] - 1)) + 1)) / 4.0);
Stats[i] = (ushort)Math.Floor((2 * (B + I) + E) * L / 100.0 + 5);
}
Stats[0] += (ushort)(5 + Stat_Level); // HP
return Stats;
}
public override bool getGenderIsValid()
{
int gv = PersonalTable.C[Species].Gender;
if (gv == 255)
return Gender == 2;
if (gv == 254)
return Gender == 0;
if (gv == 0)
return Gender == 1;
switch (gv)
{
case 191:
return IV_ATK >= 2 ? Gender == 0 : Gender == 1;
case 127:
return IV_ATK >= 5 ? Gender == 0 : Gender == 1;
case 63:
return IV_ATK >= 7 ? Gender == 0 : Gender == 1;
case 31:
return IV_ATK >= 12 ? Gender == 0 : Gender == 1;
}
return false;
}
public override bool IsEgg { get; set; }
public override int Gender
{
get
{
int gv = PersonalTable.C[Species].Gender;
if (gv == 255)
return 2;
if (gv == 254)
return 0;
if (gv == 0)
return 1;
switch (gv)
{
case 191:
return IV_ATK >= 2 ? 0 : 1;
case 127:
return IV_ATK >= 5 ? 0 : 1;
case 63:
return IV_ATK >= 7 ? 0 : 1;
case 31:
return IV_ATK >= 12 ? 0 : 1;
}
Console.WriteLine("Unknown Gender value: " + gv);
return 0;
}
set { }
}
public bool hasMetData => CaughtData != 0;
public override bool CanHoldItem(ushort[] ValidArray)
{
return ValidArray.Contains((ushort)HeldItem);
}
#region Future, Unused Attributes
public override uint EncryptionConstant { get { return 0; } set { } }
public override uint PID { get { return 0; } set { } }
public override int Nature { get { return 0; } set { } }
public override int AltForm
{
get
{
if (Species != 201) // Unown
return 0;
else
{
uint formeVal = 0;
formeVal |= (uint)((IV_ATK & 0x6) << 5);
formeVal |= (uint)((IV_DEF & 0x6) << 3);
formeVal |= (uint)((IV_SPE & 0x6) << 1);
formeVal |= (uint)((IV_SPC & 0x6) >> 1);
return (int)(formeVal / 10);
}
}
set{ }
}
public override int HPType
{
get { return 4 * (IV_ATK % 4) + (IV_DEF % 4); }
set
{
}
}
public override bool IsShiny => IV_DEF == 10 && IV_SPE == 10 && IV_SPC == 10 && (new[] { 2, 3, 6, 7, 10, 11, 14, 15 }).Contains(IV_ATK);
public override ushort Sanity { get { return 0; } set { } }
public override bool ChecksumValid => true;
public override ushort Checksum { get { return 0; } set { } }
public override int Language { get { return 0; } set { } }
public override bool FatefulEncounter { get { return false; } set { } }
public override int TSV => 0x0000;
public override int PSV => 0xFFFF;
public override int Characteristic => -1;
public override byte MarkByte { get { return 0; } protected set { } }
public override int Ability { get { return 0; } set { } }
public override int CurrentHandler { get { return 0; } set { } }
public override int Egg_Location { get { return 0; } set { } }
public override int OT_Friendship { get { return 0; } set { } }
public override int Ball { get { return 0; } set { } }
public override int Version { get { return 0; } set { } }
public override int SID { get { return 0; } set { } }
public override int CNT_Cool { get { return 0; } set { } }
public override int CNT_Beauty { get { return 0; } set { } }
public override int CNT_Cute { get { return 0; } set { } }
public override int CNT_Smart { get { return 0; } set { } }
public override int CNT_Tough { get { return 0; } set { } }
public override int CNT_Sheen { get { return 0; } set { } }
#endregion
}
public class PokemonList2
{
private const int CAPACITY_DAYCARE = 1;
private const int CAPACITY_PARTY = 6;
private const int CAPACITY_STORED = 20;
private const int CAPACITY_STORED_JP = 30;
private readonly bool Japanese;
private int StringLength => Japanese ? PK2.STRLEN_J : PK2.STRLEN_U;
public enum CapacityType
{
Daycare = CAPACITY_DAYCARE,
Party = CAPACITY_PARTY,
Stored = CAPACITY_STORED,
StoredJP = CAPACITY_STORED_JP,
Single
}
public static int getEntrySize(CapacityType c)
{
return c == CapacityType.Single || c == CapacityType.Party
? PKX.SIZE_2PARTY
: PKX.SIZE_2STORED;
}
public static byte getCapacity(CapacityType c)
{
return c == CapacityType.Single ? (byte)1 : (byte)c;
}
private byte[] getEmptyList(CapacityType c, bool is_JP = false)
{
int cap = getCapacity(c);
return new[] { (byte)0 }.Concat(Enumerable.Repeat((byte)0xFF, cap + 1)).Concat(Enumerable.Repeat((byte)0, getEntrySize(c) * cap)).Concat(Enumerable.Repeat((byte)0x50, (is_JP ? PK2.STRLEN_J : PK2.STRLEN_U) * 2 * cap)).ToArray();
}
public PokemonList2(byte[] d, CapacityType c = CapacityType.Single, bool jp = false)
{
Japanese = jp;
Data = d ?? getEmptyList(c, Japanese);
Capacity = getCapacity(c);
Entry_Size = getEntrySize(c);
if (Data.Length != DataSize)
{
Array.Resize(ref Data, DataSize);
}
Pokemon = new PK2[Capacity];
for (int i = 0; i < Capacity; i++)
{
int base_ofs = 2 + Capacity;
byte[] dat = Data.Skip(base_ofs + Entry_Size * i).Take(Entry_Size).ToArray();
Pokemon[i] = new PK2(dat, null, jp)
{
IsEgg = Data[1 + i] == 0xFD,
otname = Data.Skip(base_ofs + Capacity*Entry_Size + StringLength*i).Take(StringLength).ToArray(),
nick = Data.Skip(base_ofs + Capacity*Entry_Size + StringLength*Capacity + StringLength*i)
.Take(StringLength).ToArray()
};
}
}
public PokemonList2(CapacityType c = CapacityType.Single, bool jp = false)
: this(null, c, jp)
{
Count = 1;
}
public PokemonList2(PK2 pk)
: this(CapacityType.Single, pk.Japanese)
{
this[0] = pk;
Count = 1;
}
private readonly byte[] Data;
private readonly byte Capacity;
private readonly int Entry_Size;
public byte Count
{
get { return Data[0]; }
set { Data[0] = value > Capacity ? Capacity : value; }
}
public readonly PK2[] Pokemon;
public PK2 this[int i]
{
get
{
if (i > Capacity || i < 0) throw new IndexOutOfRangeException($"Invalid PokemonList Access: {i}");
return Pokemon[i];
}
set
{
if (value == null) return;
Pokemon[i] = (PK2)value.Clone();
}
}
private void Update()
{
if (Pokemon.Any(pk => pk.Species == 0))
Count = (byte)Array.FindIndex(Pokemon, pk => pk.Species == 0);
else
Count = Capacity;
for (int i = 0; i < Count; i++)
{
Data[1 + i] = Pokemon[i].IsEgg ? (byte)0xFD : (byte)Pokemon[i].Species;
Array.Copy(Pokemon[i].Data, 0, Data, 2 + Capacity + Entry_Size * i, Entry_Size);
Array.Copy(Pokemon[i].OT_Name_Raw, 0, Data, 2 + Capacity + Capacity * Entry_Size + StringLength * i, StringLength);
Array.Copy(Pokemon[i].Nickname_Raw, 0, Data, 2 + Capacity + Capacity * Entry_Size + StringLength * Capacity + StringLength * i, StringLength);
}
Data[1 + Count] = byte.MaxValue;
}
public byte[] GetBytes()
{
Update();
return Data;
}
private int DataSize => Capacity * (Entry_Size + 1 + 2 * StringLength) + 2;
public static int GetDataLength(CapacityType c, bool jp = false)
{
return getCapacity(c) * (getEntrySize(c) + 1 + 2 * (jp ? PK2.STRLEN_J : PK2.STRLEN_U)) + 2;
}
}
}

View file

@ -226,7 +226,7 @@ namespace PKHeX
public abstract int CurrentHandler { get; set; }
// Derived
public bool IsShiny => TSV == PSV;
public virtual bool IsShiny => TSV == PSV;
public bool Gen6 => Version >= 24 && Version <= 29;
public bool XY => Version == (int)GameVersion.X || Version == (int)GameVersion.Y;
public bool AO => Version == (int)GameVersion.AS || Version == (int)GameVersion.OR;
@ -335,7 +335,7 @@ namespace PKHeX
get { return new[] { CNT_Cool, CNT_Beauty, CNT_Cute, CNT_Smart, CNT_Tough, CNT_Sheen }; }
set { if (value?.Length != 6) return; CNT_Cool = value[0]; CNT_Beauty = value[1]; CNT_Cute = value[2]; CNT_Smart = value[3]; CNT_Tough = value[4]; CNT_Sheen = value[5]; }
}
public int HPType
public virtual int HPType
{
get { return 15 * ((IV_HP & 1) + 2 * (IV_ATK & 1) + 4 * (IV_DEF & 1) + 8 * (IV_SPE & 1) + 16 * (IV_SPA & 1) + 32 * (IV_SPD & 1)) / 63; }
set

View file

@ -34,6 +34,9 @@ namespace PKHeX
case PKX.SIZE_1JLIST:
case PKX.SIZE_1ULIST:
return 1;
case PKX.SIZE_2ULIST:
case PKX.SIZE_2JLIST:
return 2;
case PKX.SIZE_3PARTY:
case PKX.SIZE_3STORED:
return 3;
@ -74,10 +77,15 @@ namespace PKHeX
switch (getPKMDataFormat(data))
{
case 1:
var PL = new PokemonList1(data, PokemonList1.CapacityType.Single, data.Length == PKX.SIZE_1JLIST);
var PL1 = new PokemonList1(data, PokemonList1.CapacityType.Single, data.Length == PKX.SIZE_1JLIST);
if (ident != null)
PL[0].Identifier = ident;
return PL[0];
PL1[0].Identifier = ident;
return PL1[0];
case 2:
var PL2 = new PokemonList2(data, PokemonList2.CapacityType.Single, data.Length == PKX.SIZE_2JLIST);
if (ident != null)
PL2[0].Identifier = ident;
return PL2[0];
case 3:
return new PK3(data, ident);
case 4:

View file

@ -15,6 +15,11 @@ namespace PKHeX
internal const int SIZE_1PARTY = 44;
internal const int SIZE_1STORED = 33;
internal const int SIZE_2ULIST = 73;
internal const int SIZE_2JLIST = 63;
internal const int SIZE_2PARTY = 48;
internal const int SIZE_2STORED = 32;
internal const int SIZE_3PARTY = 100;
internal const int SIZE_3STORED = 80;
internal const int SIZE_3BLOCK = 12;
@ -38,7 +43,7 @@ namespace PKHeX
/// <returns>A boolean indicating whether or not the length is valid for a Pokemon file.</returns>
public static bool getIsPKM(long len)
{
return new[] {SIZE_1JLIST, SIZE_1ULIST, SIZE_3STORED, SIZE_3PARTY, SIZE_4STORED, SIZE_4PARTY, SIZE_5PARTY, SIZE_6STORED, SIZE_6PARTY}.Contains((int)len);
return new[] {SIZE_1JLIST, SIZE_1ULIST, SIZE_2ULIST, SIZE_2JLIST, SIZE_3STORED, SIZE_3PARTY, SIZE_4STORED, SIZE_4PARTY, SIZE_5PARTY, SIZE_6STORED, SIZE_6PARTY}.Contains((int)len);
}
// C# PKX Function Library
@ -523,6 +528,8 @@ namespace PKHeX
Image itemimg = (Image)Resources.ResourceManager.GetObject("item_" + item) ?? Resources.helditem;
if ((generation == 3 || generation == 4) && 328 <= item && item <= 419) // gen3/4 TM
itemimg = Resources.item_tm;
if (generation == 2)
itemimg = Resources.helditem; // Don't even try
// Redraw
baseImage = Util.LayerImage(baseImage, itemimg, 22 + (15 - itemimg.Width) / 2, 15 + (15 - itemimg.Height), 1);
@ -1961,7 +1968,17 @@ namespace PKHeX
{"ー", 0xE3},
{"ァ", 0xE9},
{"♂", 0xEF},
{"♀", 0xF5}
{"♀", 0xF5},
{"0", 0xF6},
{"1", 0xF7},
{"2", 0xF8},
{"3", 0xF9},
{"4", 0xFA},
{"5", 0xFB},
{"6", 0xFC},
{"7", 0xFD},
{"8", 0xFE},
{"9", 0xFF}
};
private static Dictionary<byte, string> RBY2U_J => new Dictionary<byte, string> {
@ -2117,17 +2134,20 @@ namespace PKHeX
{0xE3, "ー"},
{0xE9, "ァ"},
{0xEF, "♂"},
{0xF5, "♀"}
{0xF5, "♀"},
{0xF6, "0"},
{0xF7, "1"},
{0xF8, "2"},
{0xF9, "3"},
{0xFA, "4"},
{0xFB, "5"},
{0xFC, "6"},
{0xFD, "7"},
{0xFE, "8"},
{0xFF, "9"}
};
#endregion
#region Gen 1 Item Table
public static string[] getG1ItemList()
{
return new[] { "(None)", "Master Ball", "Ultra Ball", "Great Ball", "Poké Ball", "Town Map", "Bicycle", "????? (7)", "Safari Ball", "Pokédex", "Moon Stone", "Antidote", "Burn Heal", "Ice Heal", "Awakening", "Parlyz Heal", "Full Restore", "Max Potion", "Hyper Potion", "Super Potion", "Potion", "BoulderBadge", "CascadeBadge", "ThunderBadge", "RainbowBadge", "SoulBadge", "MarshBadge", "VolcanoBadge", "EarthBadge", "Escape Rope", "Repel", "Old Amber", "Fire Stone", "Thunder Stone", "Water Stone", "HP Up", "Protein", "Iron", "Carbos", "Calcium", "Rare Candy", "Dome Fossil", "Helix Fossil", "Secret Key", "????? (44)", "Bike Voucher", "X Accuracy", "Leaf Stone", "Card Key", "Nugget", "PP Up (Unused)", "Poké Doll", "Full Heal", "Revive", "Max Revive", "Guard Spec.", "Super Repel", "Max Repel", "Dire Hit", "Coin", "Fresh Water", "Soda Pop", "Lemonade", "S.S. Ticket", "Gold Teeth", "X Attack", "X Defend", "X Speed", "X Special", "Coin Case", "Oak's Parcel", "Itemfinder", "Silph Scope", "Poké Flute", "Lift Key", "Exp. All", "Old Rod", "Good Rod", "Super Rod", "PP Up", "Ether", "Max Ether", "Elixer", "Max Elixer", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "HM01", "HM02", "HM03", "HM04", "HM05", "TM01", "TM02", "TM03", "TM04", "TM05", "TM06", "TM07", "TM08", "TM09", "TM10", "TM11", "TM12", "TM13", "TM14", "TM15", "TM16", "TM17", "TM18", "TM19", "TM20", "TM21", "TM22", "TM23", "TM24", "TM25", "TM26", "TM27", "TM28", "TM29", "TM30", "TM31", "TM32", "TM33", "TM34", "TM35", "TM36", "TM37", "TM38", "TM39", "TM40", "TM41", "TM42", "TM43", "TM44", "TM45", "TM46", "TM47", "TM48", "TM49", "TM50", "TM51", "TM52", "TM53", "TM54", "TM55" };
}
#endregion
public static int[] getG1LegalItems()
{
return Enumerable.Range(0, 7) // 0-6

View file

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace PKHeX
@ -30,6 +31,7 @@ namespace PKHeX
public int[] EVs;
public int[] IVs;
public int[] Moves;
public List<string> InvalidLines = new List<string>();
// Parsing Utility
public ShowdownSet(string input = null)
@ -136,6 +138,7 @@ namespace PKHeX
case "Level": { Level = Util.ToInt32(brokenline[1]); break; }
case "Shiny": { Shiny = brokenline[1] == "Yes"; break; }
case "Happiness": { Friendship = Util.ToInt32(brokenline[1]); break; }
case "Nature": { Nature = Array.IndexOf(natures, brokenline[1]); break; }
case "EVs":
{
// Get EV list String
@ -185,6 +188,7 @@ namespace PKHeX
)
{
string[] tmp = spec.Split(new[] { "-" }, StringSplitOptions.None);
if (tmp.Length < 2) return;
Species = Array.IndexOf(species, tmp[0].Replace(" ", ""));
Form = tmp[1].Trim();
if (tmp.Length > 2)
@ -194,7 +198,13 @@ namespace PKHeX
else if (brokenline[0].Contains("Nature"))
Nature = Array.IndexOf(natures, line.Split(' ')[0]);
else // Fallback
Species = Array.IndexOf(species, line.Split('(')[0]);
{
int spec = Array.IndexOf(species, line.Split('(')[0]);
if (spec > 0)
Species = spec;
else
InvalidLines.Add(line);
}
}
break;
}
@ -206,9 +216,9 @@ namespace PKHeX
return "";
// First Line: Name, Nickname, Gender, Item
string result = string.Format(species[Species] != Nickname ? "{0} ({1})" : "{1}", Nickname,
string result = string.Format(Nickname != null && species[Species] != Nickname ? "{0} ({1})" : "{1}", Nickname,
species[Species] + ((Form ?? "") != "" ? "-" + Form?.Replace("Mega ", "Mega-") : "")) // Species (& Form if necessary)
+ Gender + (Item != 0 ? " @ " + items[Item] : "") + Environment.NewLine;
+ Gender + (Item > 0 ? " @ " + items[Item] : "") + Environment.NewLine;
// IVs
string[] ivstr = new string[6];
@ -235,12 +245,14 @@ namespace PKHeX
result += "EVs: " + string.Join(" / ", evstr.Take(evctr)) + Environment.NewLine;
// Secondary Stats
result += "Ability: " + abilities[Ability] + Environment.NewLine;
if (Ability > -1)
result += "Ability: " + abilities[Ability] + Environment.NewLine;
result += "Level: " + Level + Environment.NewLine;
if (Shiny)
result += "Shiny: Yes" + Environment.NewLine;
result += natures[Nature] + " Nature" + Environment.NewLine;
if (Nature > -1)
result += natures[Nature] + " Nature" + Environment.NewLine;
// Add in Moves
string[] MoveLines = new string[Moves.Length];
int movectr = 0;

View file

@ -0,0 +1,80 @@
using System.Linq;
namespace PKHeX
{
public class PersonalInfoG2 : PersonalInfo
{
protected PersonalInfoG2() { }
public const int SIZE = 0x20;
public PersonalInfoG2(byte[] data)
{
if (data.Length != SIZE)
return;
Data = data;
TMHM = getBits(Data.Skip(0x18).Take(0x8).ToArray());
}
public override byte[] Write()
{
setBits(TMHM).CopyTo(Data, 0x18);
return Data;
}
public int DEX_ID { get { return Data[0x00]; } set { Data[0x00] = (byte)value; } }
public override int HP { get { return Data[0x01]; } set { Data[0x01] = (byte)value; } }
public override int ATK { get { return Data[0x02]; } set { Data[0x02] = (byte)value; } }
public override int DEF { get { return Data[0x03]; } set { Data[0x03] = (byte)value; } }
public override int SPE { get { return Data[0x04]; } set { Data[0x04] = (byte)value; } }
public override int SPA { get { return Data[0x05]; } set { Data[0x05] = (byte)value; } }
public override int SPD { get { return Data[0x06]; } set { Data[0x06] = (byte)value; } }
public override int[] Types
{
get { return new int[] { Data[0x07], Data[0x08] }; }
set
{
if (value?.Length != 2) return;
Data[0x07] = (byte)value[0];
Data[0x08] = (byte)value[1];
}
}
public override int CatchRate { get { return Data[0x09]; } set { Data[0x09] = (byte)value; } }
public override int BaseEXP { get { return Data[0x0A]; } set { Data[0x0A] = (byte)value; } }
public override int[] Items
{
get { return new int[] { Data[0xB], Data[0xC] }; }
set
{
if (value?.Length != 2) return;
Data[0xB] = (byte) value[0];
Data[0xC] = (byte) value[1];
}
}
public override int Gender { get { return Data[0xD]; } set { Data[0xD] = (byte)value; } }
public override int HatchCycles { get { return Data[0xF]; } set { Data[0xF] = (byte)value; } }
public override int EXPGrowth { get { return Data[0x16]; } set { Data[0x16] = (byte)value; } }
public override int[] EggGroups
{
get { return new[] { Data[0x17] >> 4, Data[0x17] & 0xF }; }
set
{
if (value?.Length != 2) return;
Data[0x17] = (byte)(((value[0] & 0xF) << 4) | (value[1] & 0xF));
}
}
// EV Yields are just aliases for base stats in Gen I
public override int EV_HP { get { return HP; } set { } }
public override int EV_ATK { get { return ATK; } set { } }
public override int EV_DEF { get { return DEF; } set { } }
public override int EV_SPE { get { return SPE; } set { } }
public override int EV_SPA { get { return SPA; } set { } }
public override int EV_SPD { get { return SPD; } set { } }
// Future game values, unused
public override int[] Abilities { get { return new[] { 0, 0 }; } set { } }
public override int BaseFriendship { get { return 70; } set { } }
public override int EscapeRate { get { return 0; } set { } }
public override int Color { get { return 0; } set { } }
}
}

View file

@ -15,6 +15,8 @@ namespace PKHeX
internal static readonly PersonalTable FR = new PersonalTable(Properties.Resources.personal_fr, GameVersion.FR);
internal static readonly PersonalTable E = new PersonalTable(Properties.Resources.personal_e, GameVersion.E);
internal static readonly PersonalTable RS = new PersonalTable(Properties.Resources.personal_rs, GameVersion.RS);
internal static readonly PersonalTable C = new PersonalTable(Properties.Resources.personal_c, GameVersion.C);
internal static readonly PersonalTable GS = new PersonalTable(Properties.Resources.personal_c, GameVersion.GS);
internal static readonly PersonalTable RBY = new PersonalTable(Properties.Resources.personal_rby, GameVersion.RBY);
private static byte[][] splitBytes(byte[] data, int size)
@ -33,6 +35,8 @@ namespace PKHeX
switch (format)
{
case GameVersion.RBY: size = PersonalInfoG1.SIZE; break;
case GameVersion.GS:
case GameVersion.C: size = PersonalInfoG2.SIZE; break;
case GameVersion.RS:
case GameVersion.E:
case GameVersion.FR:
@ -58,6 +62,11 @@ namespace PKHeX
for (int i = 0; i < d.Length; i++)
d[i] = new PersonalInfoG1(entries[i]);
break;
case GameVersion.GS:
case GameVersion.C:
for (int i = 0; i < d.Length; i++)
d[i] = new PersonalInfoG2(entries[i]);
break;
case GameVersion.RS:
case GameVersion.E:
case GameVersion.FR:

View file

@ -960,6 +960,16 @@ namespace PKHeX.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _172_1 {
get {
object obj = ResourceManager.GetObject("_172_1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -15495,6 +15505,16 @@ namespace PKHeX.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] personal_c {
get {
object obj = ResourceManager.GetObject("personal_c", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
@ -15525,6 +15545,16 @@ namespace PKHeX.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] personal_gs {
get {
object obj = ResourceManager.GetObject("personal_gs", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
@ -23523,6 +23553,60 @@ namespace PKHeX.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to (None)
///New Bark Town
///Route 29
///Cherrygrove City
///Route 30
///Route 31
///Violet City
///Sprout Tower
///Route 32
///Ruins of Alph
///Union Cave
///Route 33
///Azalea Town
///Slowpoke Well
///Ilex Forest
///Route 34
///Goldenrod City
///Radio Tower
///Route 35
///National Park
///Route 36
///Route 37
///Ecruteak City
///Tin Tower
///Burned Tower
///Route 38
///Route 39
///Olivine City
///Lighthouse
///Battle Tower
///Route 40
///Whirl Islands
///Route 41
///Cianwood City
///Route 42
///Mt. Mortar
///Mahogany Town
///Route 43
///Lake of Rage
///Route 44
///Ice Path
///Blackthorn City
///Dragon&apos;s Den
///Route 45
///Dark Cave
///Rout [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_gsc_00000_en {
get {
return ResourceManager.GetString("text_gsc_00000_en", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Mysteriöser Ort
///Zweiblattdorf
@ -25098,6 +25182,117 @@ namespace PKHeX.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to (None)
///Master Ball
///Ultra Ball
///Great Ball
///Poké Ball
///Town Map
///Bicycle
///????? (7)
///Safari Ball
///Pokédex
///Moon Stone
///Antidote
///Burn Heal
///Ice Heal
///Awakening
///Parlyz Heal
///Full Restore
///Max Potion
///Hyper Potion
///Super Potion
///Potion
///BoulderBadge
///CascadeBadge
///ThunderBadge
///RainbowBadge
///SoulBadge
///MarshBadge
///VolcanoBadge
///EarthBadge
///Escape Rope
///Repel
///Old Amber
///Fire Stone
///Thunder Stone
///Water Stone
///HP Up
///Protein
///Iron
///Carbos
///Calcium
///Rare Candy
///Dome Fossil
///Helix Fossil
///Secret Key
///????? (44)
///Bike Voucher
///X Accuracy
///Leaf Stone
///Card Ke [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_ItemsG1_en {
get {
return ResourceManager.GetString("text_ItemsG1_en", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to (None)
///Master Ball
///Ultra Ball
///BrightPowder
///Great Ball
///Poké Ball
///Teru-sama (0)
///Bicycle
///Moon Stone
///Antidote
///Burn Heal
///Ice Heal
///Awakening
///Parlyz Heal
///Full Restore
///Max Potion
///Hyper Potion
///Super Potion
///Potion
///Escape Rope
///Repel
///Max Elixer
///Fire Stone
///Thunder Stone
///Water Stone
///Teru-sama (1)
///HP Up
///Protein
///Iron
///Carbos
///Lucky Punch
///Calcium
///Rare Candy
///X Accuracy
///Leaf Stone
///Metal Powder
///Nugget
///Poké Doll
///Full Heal
///Revive
///Max Revive
///Guard Spec.
///Super Repel
///Max Repel
///Dire Hit
///Ter [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_ItemsG2_en {
get {
return ResourceManager.GetString("text_ItemsG2_en", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to (None)
///Master Ball

View file

@ -6397,4 +6397,22 @@
<data name="personal_rby" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\byte\personal_rby;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="text_gsc_00000_en" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\gen3\text_gsc_00000_en.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
<data name="text_ItemsG1_en" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\gen3\text_ItemsG1_en.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
<data name="personal_c" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\byte\personal_c;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="personal_gs" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\byte\personal_gs;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="text_ItemsG2_en" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\text\gen3\text_itemsg2_en.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="_172_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\Pokemon Sprites\172_1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 1,013 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

View file

@ -0,0 +1,255 @@
(None)
Master Ball
Ultra Ball
BrightPowder
Great Ball
Poké Ball
Teru-sama (0)
Bicycle
Moon Stone
Antidote
Burn Heal
Ice Heal
Awakening
Parlyz Heal
Full Restore
Max Potion
Hyper Potion
Super Potion
Potion
Escape Rope
Repel
Max Elixer
Fire Stone
Thunder Stone
Water Stone
Teru-sama (1)
HP Up
Protein
Iron
Carbos
Lucky Punch
Calcium
Rare Candy
X Accuracy
Leaf Stone
Metal Powder
Nugget
Poké Doll
Full Heal
Revive
Max Revive
Guard Spec.
Super Repel
Max Repel
Dire Hit
Teru-sama (2)
Fresh Water
Soda Pop
Lemonade
X Attack
Teru-sama (3)
X Defend
X Speed
X Special
Coin Case
Itemfinder
Teru-sama (4)
Exp Share
Old Rod
Good Rod
Silver Leaf
Super Rod
PP Up
Ether
Max Ether
Elixer
Red Scale
SecretPotion
S.S. Ticket
Mystery Egg
Clear Bell*
Silver Wing
Moomoo Milk
Quick Claw
PSNCureBerry
Gold Leaf
Soft Sand
Sharp Beak
PRZCureBerry
Burnt Berry
Ice Berry
Poison Barb
King's Rock
Bitter Berry
Mint Berry
Red Apricorn
TinyMushroom
Big Mushroom
SilverPowder
Blu Apricorn
Teru-sama (5)
Amulet Coin
Ylw Apricorn
Grn Apricorn
Cleanse Tag
Mystic Water
TwistedSpoon
Wht Apricorn
Black Belt
Blk Apricorn
Teru-sama (6)
Pnk Apricorn
BlackGlasses
SlowpokeTail
Pink Bow
Stick
Smoke Ball
NeverMeltIce
Magnet
MiracleBerry
Pearl
Big Pearl
Everstone
Spell Tag
RageCandyBar
GS Ball*
Blue Card*
Miracle Seed
Thick Club
Focus Band
Teru-sama (7)
EnergyPowder
Energy Root
Heal Powder
Revival Herb
Hard Stone
Lucky Egg
Card Key
Machine Part
Egg Ticket*
Lost Item
Stardust
Star Piece
Basement Key
Pass
Teru-sama (8)
Teru-sama (9)
Teru-sama (10)
Charcoal
Berry Juice
Scope Lens
Teru-sama (11)
Teru-sama (12)
Metal Coat
Dragon Fang
Teru-sama (13)
Leftovers
Teru-sama (14)
Teru-sama (15)
Teru-sama (16)
MysteryBerry
Dragon Scale
Berserk Gene
Teru-sama (17)
Teru-sama (18)
Teru-sama (19)
Sacred Ash
Heavy Ball
Flower Mail
Level Ball
Lure Ball
Fast Ball
Teru-sama (20)
Light Ball
Friend Ball
Moon Ball
Love Ball
Normal Box
Gorgeous Box
Sun Stone
Polkadot Bow
Teru-sama (21)
Up-Grade
Berry
Gold Berry
SquirtBottle
Teru-sama (22)
Park Ball
Rainbow Wing
Teru-sama (23)
Brick Piece
Surf Mail
Litebluemail
Portraitmail
Lovely Mail
Eon Mail
Morph Mail
Bluesky Mail
Music Mail
Mirage Mail
Teru-sama (24)
TM01
TM02
TM03
TM04
TM04 (Unused)
TM05
TM06
TM07
TM08
TM09
TM10
TM11
TM12
TM13
TM14
TM15
TM16
TM17
TM18
TM19
TM20
TM21
TM22
TM23
TM24
TM25
TM26
TM27
TM28
TM28 (Unused)
TM29
TM30
TM31
TM32
TM33
TM34
TM35
TM36
TM37
TM38
TM39
TM40
TM41
TM42
TM43
TM44
TM45
TM46
TM47
TM48
TM49
TM50
HM01
HM02
HM03
HM04
HM05
HM06
HM07
HM08 (Unused)
HM09 (Unused)
HM10 (Unused)
HM11 (Unused)
HM12 (Unused)

Binary file not shown.

View file

@ -67,22 +67,56 @@ namespace PKHeX
public void getPouchG1(ref byte[] Data)
{
InventoryItem[] items = new InventoryItem[PouchDataSize];
int numStored = Data[Offset];
for (int i = 0; i < numStored; i++)
if (Type == InventoryType.TMHMs)
{
items[i] = new InventoryItem
int slot = 0;
for (int i = 0; i < items.Length; i++)
{
Index = Data[Offset + i * 2 + 1],
Count = Data[Offset + i * 2 + 2]
};
if (Data[Offset + i] != 0)
items[slot++] = new InventoryItem
{
Index = LegalItems[i],
Count = Data[Offset+i]
};
}
while (slot < items.Length)
items[slot++] = new InventoryItem
{
Index = 0,
Count = 0
};
}
for (int i = numStored; i < items.Length; i++)
else
{
items[i] = new InventoryItem
int numStored = Data[Offset];
for (int i = 0; i < numStored; i++)
{
Index = 0,
Count = 0
};
switch (Type)
{
case InventoryType.KeyItems:
items[i] = new InventoryItem
{
Index = Data[Offset + i + 1],
Count = 1
};
break;
default:
items[i] = new InventoryItem
{
Index = Data[Offset + i * 2 + 1],
Count = Data[Offset + i * 2 + 2]
};
break;
}
}
for (int i = numStored; i < items.Length; i++)
{
items[i] = new InventoryItem
{
Index = 0,
Count = 0
};
}
}
Items = items;
@ -92,14 +126,33 @@ namespace PKHeX
{
if (Items.Length != PouchDataSize)
throw new ArgumentException("Item array length does not match original pouch size.");
for (int i = 0; i < Items.Length; i++)
if (Type == InventoryType.TMHMs)
{
Data[Offset + i * 2 + 1] = (byte)Items[i].Index;
Data[Offset + i * 2 + 2] = (byte)Items[i].Count;
for (int i = 0; i < Items.Length; i++)
{
if (LegalItems.Any(it => it == Items[i].Index))
Data[Offset + Array.FindIndex(LegalItems, it => Items[i].Index == it)] = (byte) Items[i].Count;
}
}
else if (Type == InventoryType.KeyItems)
{
for (int i = 0; i < Items.Length; i++)
{
Data[Offset + i + 1] = (byte)Items[i].Index;
}
Data[Offset] = (byte)Count;
Data[Offset + 1 + Count] = 0xFF;
}
else
{
for (int i = 0; i < Items.Length; i++)
{
Data[Offset + i * 2 + 1] = (byte)Items[i].Index;
Data[Offset + i * 2 + 2] = (byte)Items[i].Count;
}
Data[Offset] = (byte)Count;
Data[Offset + 1 + 2 * Count] = 0xFF;
}
Data[Offset] = (byte) Count;
Data[Offset + 1 + 2*Count] = 0xFF;
}
}
}

661
PKHeX/Saves/SAV2.cs Normal file
View file

@ -0,0 +1,661 @@
using System;
using System.Linq;
namespace PKHeX
{
public sealed class SAV2 : SaveFile
{
public override string BAKName => $"{FileName} [{OT} ({Version})" +/* - {LastSavedTime}*/ "].bak";
public override string Filter => "SAV File|*.sav";
public override string Extension => ".sav";
public SAV2(byte[] data = null)
{
Data = data == null ? new byte[SaveUtil.SIZE_G2RAW_U] : (byte[])data.Clone();
BAK = (byte[])Data.Clone();
Exportable = !Data.SequenceEqual(new byte[Data.Length]);
Version = data == null ? GameVersion.GSC : SaveUtil.getIsG2SAV(Data);
if (Version == GameVersion.Invalid)
return;
Japanese = SaveUtil.getIsG2SAVJ(Data) != GameVersion.Invalid;
if (Japanese && Data.Length < SaveUtil.SIZE_G2RAW_J)
Array.Resize(ref Data, SaveUtil.SIZE_G2RAW_J);
Box = Data.Length;
Array.Resize(ref Data, Data.Length + SIZE_RESERVED);
Party = getPartyOffset(0);
Personal = Version == GameVersion.GS ? PersonalTable.GS : PersonalTable.C;
getSAVOffsets();
LegalItems = new ushort[] { 3, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 51, 52, 53, 57, 60, 62, 63, 64, 65, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 117, 118, 119, 121, 122, 123, 124, 125, 126, 131, 132, 138, 139, 140, 143, 144, 146, 150, 151, 152, 156, 158, 163, 168, 169, 170, 172, 173, 174, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189 };
LegalBalls = new ushort[] { 1, 2, 4, 5, 157, 159, 160, 161, 164, 165, 166, 167};
LegalKeyItems = new ushort[] {7, 54, 55, 58, 59, 61, 66, 67, 68 , 69, 71, 127, 128, 130, 133, 134, 175, 178};
if (Version == GameVersion.C)
{
LegalKeyItems = LegalKeyItems.Concat(new ushort[] {70, 115, 116, 129}).ToArray();
}
LegalTMHMs = new ushort[] {191, 192, 193, 194, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249};
HeldItems = new ushort[] {0}.Concat(LegalItems).Concat(LegalBalls).ToArray();
Array.Sort(HeldItems);
// Stash boxes after the save file's end.
byte[] TempBox = new byte[SIZE_STOREDBOX];
for (int i = 0; i < BoxCount; i++)
{
if (i < (Japanese ? 6 : 7))
Array.Copy(Data, 0x4000 + i * (TempBox.Length + 2), TempBox, 0, TempBox.Length);
else
Array.Copy(Data, 0x6000 + (i - (Japanese ? 6 : 7)) * (TempBox.Length + 2), TempBox, 0, TempBox.Length);
PokemonList2 PL2 = new PokemonList2(TempBox, Japanese ? PokemonList2.CapacityType.StoredJP : PokemonList2.CapacityType.Stored, Japanese);
for (int j = 0; j < PL2.Pokemon.Length; j++)
{
if (j < PL2.Count)
{
byte[] pkDat = new PokemonList2(PL2[j]).GetBytes();
pkDat.CopyTo(Data, Data.Length - SIZE_RESERVED + i * SIZE_BOX + j * SIZE_STORED);
}
else
{
byte[] pkDat = new byte[PokemonList2.GetDataLength(PokemonList2.CapacityType.Single, Japanese)];
pkDat.CopyTo(Data, Data.Length - SIZE_RESERVED + i * SIZE_BOX + j * SIZE_STORED);
}
}
}
Array.Copy(Data, CurrentBoxOffset, TempBox, 0, TempBox.Length);
PokemonList2 curBoxPL = new PokemonList2(TempBox, Japanese ? PokemonList2.CapacityType.StoredJP : PokemonList2.CapacityType.Stored, Japanese);
for (int i = 0; i < curBoxPL.Pokemon.Length; i++)
{
if (i < curBoxPL.Count)
{
byte[] pkDat = new PokemonList2(curBoxPL[i]).GetBytes();
pkDat.CopyTo(Data, Data.Length - SIZE_RESERVED + CurrentBox * SIZE_BOX + i * SIZE_STORED);
}
else
{
byte[] pkDat = new byte[PokemonList2.GetDataLength(PokemonList2.CapacityType.Single, Japanese)];
pkDat.CopyTo(Data, Data.Length - SIZE_RESERVED + CurrentBox * SIZE_BOX + i * SIZE_STORED);
}
}
byte[] TempParty = new byte[PokemonList2.GetDataLength(PokemonList2.CapacityType.Party, Japanese)];
Array.Copy(Data, PartyOffset, TempParty, 0, TempParty.Length);
PokemonList2 partyList = new PokemonList2(TempParty, PokemonList2.CapacityType.Party, Japanese);
for (int i = 0; i < partyList.Pokemon.Length; i++)
{
if (i < partyList.Count)
{
byte[] pkDat = new PokemonList2(partyList[i]).GetBytes();
pkDat.CopyTo(Data, getPartyOffset(i));
}
else
{
byte[] pkDat = new byte[PokemonList2.GetDataLength(PokemonList2.CapacityType.Single, Japanese)];
pkDat.CopyTo(Data, getPartyOffset(i));
}
}
// Daycare currently undocumented for all Gen II games.
// Enable Pokedex editing
PokeDex = 0;
if (!Exportable)
resetBoxes();
}
private const int SIZE_RESERVED = 0x8000; // unpacked box data
public override byte[] Write(bool DSV)
{
for (int i = 0; i < BoxCount; i++)
{
PokemonList2 boxPL = new PokemonList2(Japanese ? PokemonList2.CapacityType.StoredJP : PokemonList2.CapacityType.Stored, Japanese);
int slot = 0;
for (int j = 0; j < boxPL.Pokemon.Length; j++)
{
PK2 boxPK = (PK2) getPKM(getData(getBoxOffset(i) + j*SIZE_STORED, SIZE_STORED));
if (boxPK.Species > 0)
boxPL[slot++] = boxPK;
}
if (i < (Japanese ? 6 : 7))
boxPL.GetBytes().CopyTo(Data, 0x4000 + i * (SIZE_STOREDBOX + 2));
else
boxPL.GetBytes().CopyTo(Data, 0x6000 + (i - (Japanese ? 6 : 7)) * (SIZE_STOREDBOX + 2));
if (i == CurrentBox)
boxPL.GetBytes().CopyTo(Data, CurrentBoxOffset);
}
PokemonList2 partyPL = new PokemonList2(PokemonList2.CapacityType.Party, Japanese);
int pSlot = 0;
for (int i = 0; i < 6; i++)
{
PK2 partyPK = (PK2)getPKM(getData(getPartyOffset(i), SIZE_STORED));
if (partyPK.Species > 0)
partyPL[pSlot++] = partyPK;
}
partyPL.GetBytes().CopyTo(Data, PartyOffset);
setChecksums();
if (Version == GameVersion.C && !Japanese)
{
Array.Copy(Data, 0x2009, Data, 0x1209, 0xB7A);
}
if (Version == GameVersion.C && Japanese)
{
Array.Copy(Data, 0x2009, Data, 0x7209, 0xB32);
}
if (Version == GameVersion.GS && !Japanese)
{
Array.Copy(Data, 0x2009, Data, 0x15C7, 0x222F - 0x2009);
Array.Copy(Data, 0x222F, Data, 0x3D69, 0x23D9 - 0x222F);
Array.Copy(Data, 0x23D9, Data, 0x0C6B, 0x2856 - 0x23D9);
Array.Copy(Data, 0x2856, Data, 0x7E39, 0x288A - 0x2856);
Array.Copy(Data, 0x288A, Data, 0x10E8, 0x2D69 - 0x288A);
}
if (Version == GameVersion.GS && Japanese)
{
Array.Copy(Data, 0x2009, Data, 0x7209, 0xC83);
}
byte[] outData = new byte[Data.Length - SIZE_RESERVED];
Array.Copy(Data, outData, outData.Length);
return outData;
}
private void getSAVOffsets()
{
OptionsOffset = 0x2000;
Trainer1 = 0x2009;
switch (Version)
{
case GameVersion.GS:
DaylightSavingsOffset = Japanese ? 0x2029 : 0x2042;
TimePlayedOffset = Japanese ? 0x2034 : 0x2053;
PaletteOffset = Japanese ? 0x204C : 0x206B;
MoneyOffset = Japanese ? 0x23BC : 0x23DB;
JohtoBadgesOffset = Japanese ? 0x23C5 : 0x23E4;
CurrentBoxIndexOffset = Japanese ? 0x2705 : 0x2724;
BoxNamesOffset = Japanese ? 0x2708 : 0x2727;
PartyOffset = Japanese ? 0x283E : 0x288A;
PokedexCaughtOffset = Japanese ? 0x29CE : 0x2A4C;
PokedexSeenOffset = Japanese ? 0x29EE : 0x2A6C;
CurrentBoxOffset = Japanese ? 0x2D10 : 0x2D6C;
GenderOffset = -1; // No gender in GSC
break;
case GameVersion.C:
DaylightSavingsOffset = Japanese ? 0x2029 : 0x2042;
TimePlayedOffset = Japanese ? 0x2034 : 0x2052;
PaletteOffset = Japanese ? 0x204C : 0x206A;
MoneyOffset = Japanese ? 0x23BE : 0x23DC;
JohtoBadgesOffset = Japanese ? 0x23C7 : 0x23E5;
CurrentBoxIndexOffset = Japanese ? 0x26E2 : 0x2700;
BoxNamesOffset = Japanese ? 0x26E5 : 0x2703;
PartyOffset = Japanese ? 0x281A : 0x2865;
PokedexCaughtOffset = Japanese ? 0x29AA : 0x2A27;
PokedexSeenOffset = Japanese ? 0x29CA : 0x2A47;
CurrentBoxOffset = 0x2D10;
GenderOffset = Japanese ? 0x8000 : 0x3E3D;
break;
}
}
// Configuration
public override SaveFile Clone() { return new SAV2(Data.Take(Data.Length - SIZE_RESERVED).ToArray()); }
public override int SIZE_STORED => Japanese ? PKX.SIZE_2JLIST : PKX.SIZE_2ULIST;
public override int SIZE_PARTY => Japanese ? PKX.SIZE_2JLIST : PKX.SIZE_2ULIST;
public int SIZE_BOX => BoxSlotCount*SIZE_STORED;
public int SIZE_STOREDBOX => PokemonList2.GetDataLength(Japanese ? PokemonList2.CapacityType.StoredJP : PokemonList2.CapacityType.Stored, Japanese);
public override PKM BlankPKM => new PK2(null, null, Japanese);
protected override Type PKMType => typeof(PK2);
public override int MaxMoveID => 251;
public override int MaxSpeciesID => 251;
public override int MaxAbilityID => 0;
public override int MaxItemID => 255;
public override int MaxBallID => 0;
public override int MaxGameID => 99; // What do I set this to...?
public override int BoxCount => Japanese ? 9 : 14;
public override int MaxEV => 65535;
public override int MaxIV => 15;
public override int Generation => 2;
protected override int GiftCountMax => 0;
public override int OTLength => Japanese ? 5 : 7;
public override int NickLength => Japanese ? 5 : 10;
public override int BoxSlotCount => Japanese ? 30 : 20;
public override bool HasParty => true;
private int StringLength => Japanese ? PK2.STRLEN_J : PK2.STRLEN_U;
// Offsets
private int OptionsOffset { get; set; } = int.MinValue;
private int DaylightSavingsOffset { get; set; } = int.MinValue;
private int TimePlayedOffset { get; set; } = int.MinValue;
private int PaletteOffset { get; set; } = int.MinValue;
private int MoneyOffset { get; set; } = int.MinValue;
private int JohtoBadgesOffset { get; set; } = int.MinValue;
private int CurrentBoxIndexOffset { get; set; } = int.MinValue;
private int BoxNamesOffset { get; set; } = int.MinValue;
private int PartyOffset { get; set; } = int.MinValue;
private int PokedexSeenOffset { get; set; } = int.MinValue;
private int PokedexCaughtOffset { get; set; } = int.MinValue;
private int CurrentBoxOffset { get; set; } = int.MinValue;
private int GenderOffset { get; set; } = int.MinValue;
// Checksums
protected override void setChecksums()
{
ushort accum = 0;
for (int i = 0x2009; i <= 0x2B3A; i++)
accum += Data[i];
if (Version == GameVersion.C && Japanese)
{
BitConverter.GetBytes(accum).CopyTo(Data, 0x2D0D);
BitConverter.GetBytes(accum).CopyTo(Data, 0x7F0D);
}
for (int i = 0x2B3B; i <= 0x2B82; i++)
accum += Data[i];
if (Version == GameVersion.C && !Japanese)
{
BitConverter.GetBytes(accum).CopyTo(Data, 0x2D0D);
BitConverter.GetBytes(accum).CopyTo(Data, 0x1F0D);
}
for (int i = 0x2B83; i <= 0x2C8B; i++)
accum += Data[i];
if (Version == GameVersion.GS && Japanese)
{
BitConverter.GetBytes(accum).CopyTo(Data, 0x2D0D);
BitConverter.GetBytes(accum).CopyTo(Data, 0x7F0D);
}
for (int i = 0x2C8C; i <= 0x2D68; i++)
accum += Data[i];
if (Version == GameVersion.GS && !Japanese)
{
BitConverter.GetBytes(accum).CopyTo(Data, 0x2D69);
BitConverter.GetBytes(accum).CopyTo(Data, 0x7E6D);
}
}
public override bool ChecksumsValid
{
get
{
ushort accum = 0;
for (int i = 0x2009; i <= 0x2B3A; i++)
accum += Data[i];
if (Version == GameVersion.C && Japanese)
return accum == BitConverter.ToUInt16(Data, 0x2D0D); // Japanese Crystal
for (int i = 0x2B3B; i <= 0x2B82; i++)
accum += Data[i];
if (Version == GameVersion.C && !Japanese)
return accum == BitConverter.ToUInt16(Data, 0x2D0D); // US Crystal
for (int i = 0x2B83; i <= 0x2C8B; i++)
accum += Data[i];
if (Version == GameVersion.GS && Japanese)
return accum == BitConverter.ToUInt16(Data, 0x2D69); // Japanese Gold/Silver
for (int i = 0x2C8C; i <= 0x2D68; i++)
accum += Data[i];
if (Version == GameVersion.GS && !Japanese)
return accum == BitConverter.ToUInt16(Data, 0x2D69); // US Gold/Silver
return false;
}
}
private int getChecksum()
{
ushort accum = 0;
for (int i = 0x2009; i <= 0x2B3A; i++)
accum += Data[i];
if (Version == GameVersion.C && Japanese)
return accum; // Japanese Crystal
for (int i = 0x2B3B; i <= 0x2B82; i++)
accum += Data[i];
if (Version == GameVersion.C && !Japanese)
return accum; // US Crystal
for (int i = 0x2B83; i <= 0x2C8B; i++)
accum += Data[i];
if (Version == GameVersion.GS && Japanese)
return accum; // Japanese Gold/Silver
for (int i = 0x2C8C; i <= 0x2D68; i++)
accum += Data[i];
if (Version == GameVersion.GS && !Japanese)
return accum; // US Gold/Silver
return 0;
}
public override string ChecksumInfo => ChecksumsValid ? "Checksum valid." : "Checksum invalid";
// Trainer Info
public override GameVersion Version { get; protected set; }
public override string OT
{
get { return PKX.getG1Str(Data.Skip(0x200B).Take(StringLength).ToArray(), Japanese); }
set
{
byte[] strdata = PKX.setG1Str(value, Japanese);
if (strdata.Length > StringLength)
throw new ArgumentException("OT Name too long for given save file.");
strdata.CopyTo(Data, 0x200B);
}
}
public override int Gender
{
get { return Version == GameVersion.C ? Data[GenderOffset] : 0; }
set
{
if (Version != GameVersion.C)
return;
Data[GenderOffset] = (byte) value;
Data[PaletteOffset] = (byte) value;
}
}
public override ushort TID
{
get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x2009)); }
set { BitConverter.GetBytes(Util.SwapEndianness(value)).CopyTo(Data, 0x2009); }
}
public override ushort SID
{
get { return 0; }
set { }
}
public override int PlayedHours
{
get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, TimePlayedOffset)); }
set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data,TimePlayedOffset); }
}
public override int PlayedMinutes
{
get { return Data[TimePlayedOffset+2]; }
set { Data[TimePlayedOffset+2] = (byte)value; }
}
public override int PlayedSeconds
{
get { return Data[TimePlayedOffset + 3]; }
set { Data[TimePlayedOffset + 3] = (byte)value; }
}
public int Badges
{
get { return BitConverter.ToUInt16(Data, JohtoBadgesOffset); }
set { if (value < 0) return; BitConverter.GetBytes(value).CopyTo(Data, JohtoBadgesOffset); }
}
private byte Options
{
get { return Data[0x2000]; }
set { Data[0x2000] = value; }
}
public bool BattleEffects
{
get { return (Options & 0x80) == 0; }
set { Options = (byte)((Options & 0x7F) | (value ? 0 : 0x80)); }
}
public bool BattleStyleSwitch
{
get { return (Options & 0x40) == 0; }
set { Options = (byte)((Options & 0xBF) | (value ? 0 : 0x40)); }
}
public int Sound
{
get { return (Options & 0x30) >> 4; }
set
{
var new_sound = value;
if (new_sound > 0)
new_sound = 2; // Stereo
if (new_sound < 0)
new_sound = 0; // Mono
Options = (byte)((Options & 0xCF) | (new_sound << 4));
}
}
public int TextSpeed
{
get { return Options & 0x7; }
set
{
var new_speed = value;
if (new_speed > 7)
new_speed = 7;
if (new_speed < 0)
new_speed = 0;
Options = (byte)((Options & 0xF8) | new_speed);
}
}
public override uint Money
{
get { return Util.SwapEndianness(BitConverter.ToUInt32(Data, MoneyOffset)) >> 8; }
set
{
BitConverter.GetBytes(Util.SwapEndianness(value > 999999 ? 999999 : value)).Skip(1).ToArray().CopyTo(Data, MoneyOffset);
}
}
public uint Coin
{
get
{
return Util.SwapEndianness(BitConverter.ToUInt16(Data, MoneyOffset+7));
}
set
{
BitConverter.GetBytes(Util.SwapEndianness(value > 9999 ? 9999 : value)).ToArray().CopyTo(Data, MoneyOffset + 7);
}
}
private readonly ushort[] LegalItems, LegalKeyItems, LegalBalls, LegalTMHMs;
public override InventoryPouch[] Inventory
{
get
{
InventoryPouch[] pouch;
if (Version == GameVersion.C)
{
pouch = new[]
{
new InventoryPouch(InventoryType.TMHMs, LegalTMHMs, 1, Japanese ? 0x23C9 : 0x23E7, 57),
new InventoryPouch(InventoryType.Items, LegalItems, 99, Japanese ? 0x2402 : 0x2420, 20),
new InventoryPouch(InventoryType.KeyItems, LegalKeyItems, 1, Japanese ? 0x242C : 0x244A, 26),
new InventoryPouch(InventoryType.Balls, LegalBalls, 99, Japanese ? 0x2447 : 0x2465, 12),
new InventoryPouch(InventoryType.MailItems, LegalItems.Concat(LegalKeyItems).Concat(LegalBalls).Concat(LegalTMHMs).ToArray(), 99, Japanese ? 0x2461 : 0x247F, 50)
};
}
else
{
pouch = new[]
{
new InventoryPouch(InventoryType.TMHMs, LegalTMHMs, 1, Japanese ? 0x23C7 : 0x23E6, 57),
new InventoryPouch(InventoryType.Items, LegalItems, 99, Japanese ? 0x2400 : 0x241F, 20),
new InventoryPouch(InventoryType.KeyItems, LegalKeyItems, 99, Japanese ? 0x242A : 0x2449, 26),
new InventoryPouch(InventoryType.Balls, LegalBalls, 99, Japanese ? 0x2445 : 0x2464, 12),
new InventoryPouch(InventoryType.MailItems, LegalItems.Concat(LegalKeyItems).Concat(LegalBalls).Concat(LegalTMHMs).ToArray(), 99, Japanese ? 0x245F : 0x247E, 50)
};
}
foreach (var p in pouch)
{
p.getPouchG1(ref Data);
}
return pouch;
}
set
{
foreach (var p in value)
{
int ofs = 0;
for (int i = 0; i < p.Count; i++)
{
while (p.Items[ofs].Count == 0)
ofs++;
p.Items[i] = p.Items[ofs++];
}
while (ofs < p.Items.Length)
p.Items[ofs++] = new InventoryItem { Count = 0, Index = 0 };
p.setPouchG1(ref Data);
}
}
}
public override int getDaycareSlotOffset(int loc, int slot)
{
return Daycare;
}
public override ulong? getDaycareRNGSeed(int loc)
{
return null;
}
public override uint? getDaycareEXP(int loc, int slot)
{
return null;
}
public override bool? getDaycareOccupied(int loc, int slot)
{
return null;
}
public override void setDaycareEXP(int loc, int slot, uint EXP)
{
}
public override void setDaycareOccupied(int loc, int slot, bool occupied)
{
}
// Storage
public override int PartyCount
{
get { return Data[PartyOffset]; }
protected set
{
Data[PartyOffset] = (byte)value;
}
}
public override int getBoxOffset(int box)
{
return Data.Length - SIZE_RESERVED + box * SIZE_BOX;
}
public override int getPartyOffset(int slot)
{
return Data.Length - SIZE_RESERVED + BoxCount * SIZE_BOX + slot * SIZE_STORED;
}
public override int CurrentBox
{
get { return Data[CurrentBoxIndexOffset] & 0x7F; }
set { Data[CurrentBoxIndexOffset] = (byte)((Data[Japanese ? 0x2842 : 0x284C] & 0x80) | (value & 0x7F)); }
}
public override int getBoxWallpaper(int box)
{
return 0;
}
public override string getBoxName(int box)
{
return PKX.getG1Str(Data.Skip(BoxNamesOffset + box*9).Take(9).ToArray(), Japanese);
}
public override void setBoxName(int box, string value)
{
// Don't allow for custom box names
}
public override PKM getPKM(byte[] data)
{
if (data.Length == SIZE_STORED)
return new PokemonList2(data, PokemonList2.CapacityType.Single, Japanese)[0];
return new PK2(data);
}
public override byte[] decryptPKM(byte[] data)
{
return data;
}
// Pokédex
public override bool getSeen(PKM pkm)
{
if (pkm.Species == 0)
return false;
if (pkm.Species > MaxSpeciesID)
return false;
if (Version == GameVersion.Unknown)
return false;
int bit = pkm.Species - 1;
int ofs = bit >> 3;
byte bitval = (byte)(1 << (bit & 7));
// Get the Seen Flag
return (Data[PokedexSeenOffset + ofs] & bitval) != 0;
}
public override bool getCaught(PKM pkm)
{
if (pkm.Species == 0)
return false;
if (pkm.Species > MaxSpeciesID)
return false;
if (Version == GameVersion.Unknown)
return false;
int bit = pkm.Species - 1;
int ofs = bit >> 3;
byte bitval = (byte)(1 << (bit & 7));
// Get the Caught Flag
return (Data[PokedexCaughtOffset + ofs] & bitval) != 0;
}
protected internal override void setSeen(PKM pkm, bool seen = true)
{
if (pkm.Species == 0)
return;
if (pkm.Species > MaxSpeciesID)
return;
if (Version == GameVersion.Unknown)
return;
int bit = pkm.Species - 1;
int ofs = bit >> 3;
byte bitval = (byte)(1 << (bit & 7));
// Set the Seen Flag
Data[PokedexSeenOffset + ofs] &= (byte)(~bitval);
if (seen)
Data[PokedexSeenOffset + ofs] |= bitval;
}
protected internal override void setCaught(PKM pkm, bool caught = true)
{
if (pkm.Species == 0)
return;
if (pkm.Species > MaxSpeciesID)
return;
if (Version == GameVersion.Unknown)
return;
int bit = pkm.Species - 1;
int ofs = bit >> 3;
byte bitval = (byte)(1 << (bit & 7));
// Set the Captured Flag
Data[PokedexCaughtOffset + ofs] &= (byte)(~bitval);
if (caught)
{
Data[PokedexCaughtOffset + ofs] |= bitval;
if (pkm.Species == 201) // Unown
{
// Give all Unown caught to prevent a crash on pokedex view
for (int i = 1; i <= 26; i++)
{
Data[PokedexSeenOffset + 0x1F + i] = (byte)(i);
}
}
}
}
}
}

View file

@ -63,6 +63,8 @@ namespace PKHeX
public bool RS => Version == GameVersion.RS;
public bool RBY => Version == GameVersion.RBY;
public bool GSC => Version == GameVersion.GS || Version == GameVersion.C;
public virtual int MaxMoveID => int.MaxValue;
public virtual int MaxSpeciesID => int.MaxValue;
public virtual int MaxAbilityID => int.MaxValue;

View file

@ -8,6 +8,9 @@ namespace PKHeX
{
public enum GameVersion
{
/* I don't want to assign Gen I/II... */
GS = -4,
C = -3,
Invalid = -2,
Any = -1,
Unknown = 0,
@ -45,6 +48,11 @@ namespace PKHeX
internal const int SIZE_G4RAW = 0x80000;
internal const int SIZE_G3RAW = 0x20000;
internal const int SIZE_G3RAWHALF = 0x10000;
internal const int SIZE_G2RAW_U = 0x8000;
internal const int SIZE_G2BAT_U = 0x802C;
internal const int SIZE_G2EMU = 0x8030;
internal const int SIZE_G2RAW_J = 0x10000;
internal const int SIZE_G2BAT_J = 0x1002C;
internal const int SIZE_G1RAW = 0x8000;
internal const int SIZE_G1BAT = 0x802C;
@ -57,6 +65,8 @@ namespace PKHeX
{
if (getIsG1SAV(data) != GameVersion.Invalid)
return 1;
if (getIsG2SAV(data) != GameVersion.Invalid)
return 2;
if (getIsG3SAV(data) != GameVersion.Invalid)
return 3;
if (getIsG4SAV(data) != GameVersion.Invalid)
@ -108,6 +118,71 @@ namespace PKHeX
}
return true;
}
/// <summary>Determines the type of 2nd gen save</summary>
/// <param name="data">Save data of which to determine the type</param>
/// <returns>Version Identifier or Invalid if type cannot be determined.</returns>
public static GameVersion getIsG2SAV(byte[] data)
{
if (data.Length != SIZE_G2RAW_U && data.Length != SIZE_G2BAT_U && data.Length != SIZE_G2RAW_J && data.Length != SIZE_G2BAT_J && data.Length != SIZE_G2EMU)
return GameVersion.Invalid;
// Check if it's not an american save or a japanese save
if (getIsG2SAVU(data) != GameVersion.Invalid)
return getIsG2SAVU(data);
if (getIsG2SAVJ(data) != GameVersion.Invalid)
return getIsG2SAVJ(data);
return GameVersion.Invalid;
}
/// <summary>Determines if 2nd gen save is non-japanese</summary>
/// <param name="data">Save data of which to determine the region</param>
/// <returns>True if a valid non-japanese save, False otherwise.</returns>
public static GameVersion getIsG2SAVU(byte[] data)
{
bool gs = true;
bool c = true;
foreach (int ofs in new[] { 0x288A, 0x2D6C })
{
byte num_entries = data[ofs];
if (num_entries > 20 || data[ofs + 1 + num_entries] != 0xFF)
gs = false;
}
foreach (int ofs in new[] { 0x2865, 0x2D10 })
{
byte num_entries = data[ofs];
if (num_entries > 20 || data[ofs + 1 + num_entries] != 0xFF)
c = false;
}
if (gs)
return GameVersion.GS;
if (c)
return GameVersion.C;
return GameVersion.Invalid;
}
/// <summary>Determines if 2nd gen save is japanese</summary>
/// <param name="data">Save data of which to determine the region</param>
/// <returns>True if a valid japanese save, False otherwise.</returns>
public static GameVersion getIsG2SAVJ(byte[] data)
{
bool gs = true;
bool c = true;
foreach (int ofs in new[] { 0x283E, 0x2D10 })
{
byte num_entries = data[ofs];
if (num_entries > 30 || data[ofs + 1 + num_entries] != 0xFF)
gs = false;
}
foreach (int ofs in new[] { 0x281A, 0x2D10 })
{
byte num_entries = data[ofs];
if (num_entries > 30 || data[ofs + 1 + num_entries] != 0xFF)
c = false;
}
if (gs)
return GameVersion.GS;
if (c)
return GameVersion.C;
return GameVersion.Invalid;
}
/// <summary>Determines the type of 3th gen save</summary>
/// <param name="data">Save data of which to determine the type</param>
/// <returns>Version Identifier or Invalid if type cannot be determined.</returns>
@ -218,6 +293,10 @@ namespace PKHeX
case GameVersion.RBY:
return GameVersion.RBY;
case GameVersion.GS:
case GameVersion.C:
return GameVersion.GSC;
case GameVersion.R:
case GameVersion.S:
return GameVersion.RS;
@ -270,6 +349,8 @@ namespace PKHeX
{
case 1:
return new SAV1(data);
case 2:
return new SAV2(data);
case 3:
return new SAV3(data);
case 4:

View file

@ -134,12 +134,14 @@ namespace PKHeX
private void B_All_Click(object sender, EventArgs e)
{
if (CHK_SecretUnlocked.Checked) // only give dist if Secret is Unlocked (None -> All -> All*)
foreach (var c in TLP_DistSuperTrain.Controls.OfType<CheckBox>())
c.Checked = true;
CHK_SecretUnlocked.Checked = true;
CHK_SecretComplete.Checked = true;
foreach (var c in TLP_SuperTrain.Controls.OfType<CheckBox>())
c.Checked = true;
foreach (var c in TLP_DistSuperTrain.Controls.OfType<CheckBox>())
c.Checked = true;
}
private void B_None_Click(object sender, EventArgs e)
{

View file

@ -207,6 +207,8 @@
// CB_Species
//
this.CB_Species.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.CB_Species.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CB_Species.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_Species.FormattingEnabled = true;
this.CB_Species.Location = new System.Drawing.Point(176, 38);
this.CB_Species.Name = "CB_Species";

View file

@ -301,7 +301,7 @@ namespace PKHeX
SaveFile s1 = SaveUtil.getVariantSAV(File.ReadAllBytes(TB_OldSAV.Text));
SaveFile s2 = SaveUtil.getVariantSAV(File.ReadAllBytes(TB_NewSAV.Text));
if (s1.GetType() != s2.GetType()) { Util.Alert("Save types are different.", $"S1: {s1.GetType()}", $"S2: {s2.GetType()}"); return; }
if (s1.GetType() != s2.GetType()) { Util.Alert("Save types are different.", $"S1: {s1.GetType().Name}", $"S2: {s2.GetType().Name}"); return; }
if (s1.Version != s2.Version) { Util.Alert("Save versions are different.", $"S1: {s1.Version}", $"S2: {s2.Version}"); return; }
string tbIsSet = "";

View file

@ -1,4 +1,5 @@
using System;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
@ -13,9 +14,13 @@ namespace PKHeX
switch (SAV.Generation)
{
case 1:
itemlist = PKX.getG1ItemList();
itemlist = Main.g1items;
B_GiveAll.Visible = false; // Can't give all, not enough room
break;
case 2:
itemlist = Main.g2items;
B_GiveAll.Visible = false;
break;
case 3:
itemlist = Main.g3items;
break;
@ -47,6 +52,8 @@ namespace PKHeX
private void getBags()
{
tabControl1.SizeMode = TabSizeMode.Fixed;
tabControl1.ItemSize = new Size(IL_Pouch.Images[0].Width + 4, 0);
for (int i = 0; i < Pouches.Length; i++)
{
// Add Tab

View file

@ -124,9 +124,9 @@
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADE
IwAAAk1TRnQBSQFMAgEBCAEAARgBAAEIAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABgAMAAWADAAEBAQABCAYAATAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABc
DwAAAk1TRnQBSQFMAgEBCAEAARgBAAEIAQABGAEAARgBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABYAMAAUgDAAEBAQABCAYAARsYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
AWYDAAGZAwABzAIAATMDAAIzAgABMw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H/Bk0HtwL/BtwC/we3
CtAB/wLNAdwCzQH/AdwB/wXQBVwB/wHNBdwF/wHNAf8FXAZNAf8JzQHcAf8GTQi3Af8B3ATNAdwB/wi3
C9AB/wPNAf8B3ALNAf8E0AVcAf8BzQXcBP8B3AHNAf8FXAZNAv8I3AL/Bk0HtwH/AdwGzQHcAf8HtwzQ
Af8CzQHcAs0B/wXQBlwB/wHNA9wE/wHcAc0B/wZcB00B/wfNAdwB/wdNBrcB/wHcCM0B3AH/BrcN0AH/
A80B/wbQB1wB/wLNAdwC/wHcAs0B/wdcB00B/wfNAdwB/wdNBrcB/wHcCM0B3AH/BrcO0AH/Ac0B/wfQ
CFwC/wTNAv8IXAdNAf8HzQHcAf8HTQe3Cv8Htw/QAf8I0ApcBP8KXAdNCv8HTRi3GNAYXBhNGLcY0Bhc
GE0BABa3AgAW0AIAFlwCABZNAwAUtwQAFNAEABRcBAAUTQIAAUIBTQE+BwABPgMAASgDAAFgAwABSAMA
AQEBAAEBBQABYAEDFgAD//8AIgABwAEAAQMBwAEAAQMBwAEAAQMBwAEAAQMBgAEAAQEBgAEAAQEBgAEA
AQEBgAEAAQHwAAGAAQABAQGAAQABAQGAAQABAQGAAQABAQHAAQABAwHAAQABAwHAAQABAwHAAQABAwHA
AQABAwHAAQABAwHAAQABAwHAAQABAwGAAQABAQGAAQABAQGAAQABAQGAAQABAfAAAYABAAEBAYABAAEB
AYABAAEBAYABAAEBAcABAAEDAcABAAEDAcABAAEDAcABAAEDCw==
</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

View file

@ -55,6 +55,28 @@ namespace PKHeX
CB_TextSpeed.SelectedIndex = sav1.TextSpeed;
}
if (SAV is SAV2)
{
SAV2 sav2 = (SAV2)SAV;
MT_Coins.Text = sav2.Coin.ToString();
L_Started.Visible = L_Fame.Visible = false;
CAL_AdventureStartDate.Visible = CAL_HoFDate.Visible = false;
CAL_AdventureStartTime.Visible = CAL_HoFTime.Visible = false;
GB_Map.Visible = false;
GB_Options.Visible = true;
CB_BattleStyle.Items.AddRange(new[] { "Switch", "Set" });
CB_SoundType.Items.AddRange(new[] { "Mono", "Stereo" });
CB_TextSpeed.Items.AddRange(new[] { "0 (Instant)", "1 (Fast)", "2", "3 (Normal)", "4", "5 (Slow)", "6", "7" });
CHK_BattleEffects.Checked = sav2.BattleEffects;
CB_BattleStyle.SelectedIndex = sav2.BattleStyleSwitch ? 0 : 1;
CB_SoundType.SelectedIndex = sav2.Sound > 0 ? 1 : 0;
CB_TextSpeed.SelectedIndex = sav2.TextSpeed;
badgeval = sav2.Badges;
cba = new[] { CHK_1, CHK_2, CHK_3, CHK_4, CHK_6, CHK_5, CHK_7, CHK_8, CHK_H1, CHK_H2, CHK_H3, CHK_H4, CHK_H5, CHK_H6, CHK_H7, CHK_H8 };
}
if (SAV is SAV3)
{
GB_Map.Visible = false;
@ -143,6 +165,18 @@ namespace PKHeX
sav1.TextSpeed = CB_TextSpeed.SelectedIndex;
}
if (SAV is SAV2)
{
SAV2 sav2 = (SAV2)SAV;
sav2.Coin = (ushort)Util.ToUInt32(MT_Coins.Text);
sav2.Badges = badgeval & 0xFFFF;
sav2.BattleEffects = CHK_BattleEffects.Checked;
sav2.BattleStyleSwitch = CB_BattleStyle.SelectedIndex == 0;
sav2.Sound = CB_SoundType.SelectedIndex > 0 ? 2 : 0;
sav2.TextSpeed = CB_TextSpeed.SelectedIndex;
}
if (SAV is SAV4)
{
SAV4 s = (SAV4)SAV;

View file

@ -30,7 +30,7 @@
/// </summary>
/// <param name="val">Value to swap endianness of.</param>
/// <returns>The endianness-swapped value.</returns>
internal static int SwapEndianness(short val)
internal static short SwapEndianness(short val)
{
return (short)SwapEndianness((ushort)val);
}