mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 13:58:33 +00:00
Merge pull request #226 from kwsch/gsc-support
Add support for editing Gen II files
This commit is contained in:
commit
aa11abfe94
25 changed files with 2811 additions and 81 deletions
33
PKHeX/MainWindow/Main.Designer.cs
generated
33
PKHeX/MainWindow/Main.Designer.cs
generated
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ 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, g1items = { };
|
||||
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 = { };
|
||||
|
@ -873,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;
|
||||
|
||||
|
@ -899,7 +911,6 @@ namespace PKHeX
|
|||
|
||||
CHK_IsEgg.Visible = Label_Gender.Visible = SAV.Generation > 1;
|
||||
|
||||
Label_OTGender.Visible = SAV.Generation > 1;
|
||||
|
||||
if (1 <= sav.Generation && sav.Generation <= 2)
|
||||
{
|
||||
|
@ -944,6 +955,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;
|
||||
|
@ -973,7 +989,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
|
||||
|
@ -1049,6 +1065,7 @@ 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");
|
||||
|
@ -1281,6 +1298,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);
|
||||
|
@ -1379,6 +1398,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;
|
||||
|
@ -1420,7 +1441,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)
|
||||
|
@ -1717,6 +1738,16 @@ namespace PKHeX
|
|||
if (SAV.Generation < 3)
|
||||
{
|
||||
TB_HPIV.Text = pkm.IV_HP.ToString("00");
|
||||
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;
|
||||
|
@ -2066,6 +2097,8 @@ namespace PKHeX
|
|||
switch (Version)
|
||||
{
|
||||
case GameVersion.GSC:
|
||||
case GameVersion.GS:
|
||||
case GameVersion.C:
|
||||
if (SaveFormat == 2)
|
||||
return metGen2;
|
||||
break;
|
||||
|
@ -2270,6 +2303,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;
|
||||
|
@ -2283,6 +2318,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)
|
||||
|
@ -2294,7 +2332,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.
|
||||
|
@ -2323,7 +2361,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)
|
||||
|
@ -2867,6 +2914,12 @@ namespace PKHeX
|
|||
else
|
||||
SystemSounds.Exclamation.Play();
|
||||
}
|
||||
|
||||
private void validateComboBox(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void clickSet(object sender, EventArgs e)
|
||||
{
|
||||
if (!verifiedPKM()) return;
|
||||
|
@ -3464,7 +3517,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)
|
||||
|
|
|
@ -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
143
PKHeX/MainWindow/MainPK2.cs
Normal 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
BIN
PKHeX/Misc/personal_gs
Normal file
Binary file not shown.
|
@ -73,6 +73,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>
|
||||
|
@ -93,6 +96,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" />
|
||||
|
@ -100,6 +104,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" />
|
||||
|
@ -119,6 +124,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" />
|
||||
|
@ -422,6 +428,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>
|
||||
|
@ -471,9 +478,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" />
|
||||
|
@ -2747,6 +2756,7 @@
|
|||
<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" />
|
||||
|
|
|
@ -30,7 +30,11 @@ namespace PKHeX
|
|||
Identifier = ident;
|
||||
if (Data.Length != SIZE_PARTY)
|
||||
Array.Resize(ref Data, SIZE_PARTY);
|
||||
int strLen = jp ? STRLEN_J : STRLEN_U;
|
||||
int strLen = STRLEN_U;
|
||||
if (jp)
|
||||
{
|
||||
strLen = STRLEN_J;
|
||||
}
|
||||
otname = Enumerable.Repeat((byte) 0x50, strLen).ToArray();
|
||||
nick = Enumerable.Repeat((byte) 0x50, strLen).ToArray();
|
||||
}
|
||||
|
@ -100,7 +104,8 @@ 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)));
|
||||
}
|
||||
|
@ -252,18 +257,17 @@ namespace PKHeX
|
|||
#endregion
|
||||
}
|
||||
|
||||
public class PokemonList1
|
||||
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 readonly bool Japanese;
|
||||
private 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,
|
||||
|
@ -308,12 +312,9 @@ namespace PKHeX
|
|||
{
|
||||
int base_ofs = 2 + Capacity;
|
||||
byte[] dat = Data.Skip(base_ofs + Entry_Size * i).Take(Entry_Size).ToArray();
|
||||
Pokemon[i] = new PK1(dat, null, jp)
|
||||
{
|
||||
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()
|
||||
};
|
||||
Pokemon[i] = new PK1(dat, null, jp);
|
||||
Pokemon[i].otname = Data.Skip(base_ofs + Capacity * Entry_Size + StringLength * i).Take(StringLength).ToArray();
|
||||
Pokemon[i].nick = Data.Skip(base_ofs + Capacity * Entry_Size + StringLength * Capacity + StringLength * i).Take(StringLength).ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -357,14 +358,14 @@ namespace PKHeX
|
|||
set
|
||||
{
|
||||
if (value == null) return;
|
||||
Pokemon[i] = (PK1)value.Clone();
|
||||
Pokemon[i] = (PK1)(((PK1)value).Clone());
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Pokemon.Any(pk => pk.Species == 0))
|
||||
Count = (byte) Array.FindIndex(Pokemon, pk => pk.Species == 0);
|
||||
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++)
|
||||
|
|
470
PKHeX/PKM/PK2.cs
Normal file
470
PKHeX/PKM/PK2.cs
Normal file
|
@ -0,0 +1,470 @@
|
|||
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 = STRLEN_U;
|
||||
if (jp)
|
||||
{
|
||||
strLen = STRLEN_J;
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
class PokemonList2
|
||||
{
|
||||
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 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);
|
||||
Pokemon[i].IsEgg = Data[1 + i] == 0xFD;
|
||||
Pokemon[i].otname = Data.Skip(base_ofs + Capacity * Entry_Size + StringLength * i).Take(StringLength).ToArray();
|
||||
Pokemon[i].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 int GetCapacity()
|
||||
{
|
||||
return Capacity;
|
||||
}
|
||||
|
||||
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)(((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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
@ -1636,7 +1643,7 @@ namespace PKHeX
|
|||
}
|
||||
|
||||
#region Gen 1 Character Tables
|
||||
private static Dictionary<byte, string> RBY2U_U => new Dictionary<byte, string>{
|
||||
internal static Dictionary<byte, string> RBY2U_U => new Dictionary<byte, string>{
|
||||
{0x50, "\0"},
|
||||
{0x5D, "[TRAINER]"},
|
||||
{0x7F, " "},
|
||||
|
@ -1699,8 +1706,8 @@ namespace PKHeX
|
|||
{0xB8, "y"},
|
||||
{0xB9, "z"},
|
||||
{0xE1, "{"}, /* Pk */
|
||||
{0xE2, "}"}, /* Mn */
|
||||
{0xE3, "-"},
|
||||
{0xE2, "}"}, /* Mn */
|
||||
{0xE3, "-"},
|
||||
{0xE6, "?"},
|
||||
{0xE7, "!"},
|
||||
{0xEF, "♂"},
|
||||
|
@ -1720,7 +1727,7 @@ namespace PKHeX
|
|||
{0xFF, "9"}
|
||||
};
|
||||
|
||||
private static Dictionary<string, byte> U2RBY_U => new Dictionary<string, byte> {
|
||||
internal static Dictionary<string, byte> U2RBY_U => new Dictionary<string, byte> {
|
||||
{"\0", 0x50},
|
||||
{"[TRAINER]", 0x5D},
|
||||
{" ", 0x7F},
|
||||
|
@ -1783,8 +1790,8 @@ namespace PKHeX
|
|||
{"y", 0xB8},
|
||||
{"z", 0xB9},
|
||||
{"{", 0xE1}, /* Pk */
|
||||
{"}", 0xE2}, /* Mn */
|
||||
{"-", 0xE3},
|
||||
{"}", 0xE2}, /* Mn */
|
||||
{"-", 0xE3},
|
||||
{"?", 0xE6},
|
||||
{"!", 0xE7},
|
||||
{"♂", 0xEF},
|
||||
|
@ -1803,7 +1810,7 @@ namespace PKHeX
|
|||
{"8", 0xFE},
|
||||
{"9", 0xFF}
|
||||
};
|
||||
private static Dictionary<string, byte> U2RBY_J => new Dictionary<string, byte> {
|
||||
internal static Dictionary<string, byte> U2RBY_J => new Dictionary<string, byte> {
|
||||
{"ガ", 0x05},
|
||||
{"ギ", 0x06},
|
||||
{"グ", 0x07},
|
||||
|
@ -1961,10 +1968,20 @@ 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> {
|
||||
static Dictionary<byte, string> RBY2U_J => new Dictionary<byte, string> {
|
||||
{0x05, "ガ"},
|
||||
{0x06, "ギ"},
|
||||
{0x07, "グ"},
|
||||
|
@ -2117,7 +2134,17 @@ 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
|
||||
|
||||
|
|
80
PKHeX/PersonalInfo/PersonalInfoG2.cs
Normal file
80
PKHeX/PersonalInfo/PersonalInfoG2.cs
Normal 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 int[] { 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 { } }
|
||||
}
|
||||
}
|
|
@ -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:
|
||||
|
|
74
PKHeX/Properties/Resources.Designer.cs
generated
74
PKHeX/Properties/Resources.Designer.cs
generated
|
@ -15505,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>
|
||||
|
@ -15535,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>
|
||||
|
@ -25219,6 +25239,60 @@ namespace PKHeX.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <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]";.
|
||||
/// </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
|
||||
|
|
|
@ -6403,6 +6403,15 @@
|
|||
<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>
|
||||
|
|
BIN
PKHeX/Resources/byte/personal_c
Normal file
BIN
PKHeX/Resources/byte/personal_c
Normal file
Binary file not shown.
BIN
PKHeX/Resources/byte/personal_gs
Normal file
BIN
PKHeX/Resources/byte/personal_gs
Normal file
Binary file not shown.
255
PKHeX/Resources/text/gen3/text_ItemsG2_en.txt
Normal file
255
PKHeX/Resources/text/gen3/text_ItemsG2_en.txt
Normal 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)
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
657
PKHeX/Saves/SAV2.cs
Normal file
657
PKHeX/Saves/SAV2.cs
Normal file
|
@ -0,0 +1,657 @@
|
|||
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;
|
||||
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
// 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
|
||||
protected int OptionsOffset { get; set; } = int.MinValue;
|
||||
protected int DaylightSavingsOffset { get; set; } = int.MinValue;
|
||||
protected int TimePlayedOffset { get; set; } = int.MinValue;
|
||||
protected int PaletteOffset { get; set; } = int.MinValue;
|
||||
protected int MoneyOffset { get; set; } = int.MinValue;
|
||||
protected int JohtoBadgesOffset { get; set; } = int.MinValue;
|
||||
protected int CurrentBoxIndexOffset { get; set; } = int.MinValue;
|
||||
protected int BoxNamesOffset { get; set; } = int.MinValue;
|
||||
protected int PartyOffset { get; set; } = int.MinValue;
|
||||
protected int PokedexSeenOffset { get; set; } = int.MinValue;
|
||||
protected int PokedexCaughtOffset { get; set; } = int.MinValue;
|
||||
protected int CurrentBoxOffset { get; set; } = int.MinValue;
|
||||
protected 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." : string.Format("Checksum invalid ({0} != {1})", Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x2D0D)).ToString("X4"), getChecksum().ToString("X4"));
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
|
|
@ -3,11 +3,15 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
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 +49,10 @@ 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_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)
|
||||
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:
|
||||
|
|
|
@ -17,6 +17,10 @@ namespace PKHeX
|
|||
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;
|
||||
|
|
|
@ -55,6 +55,29 @@ namespace PKHeX
|
|||
CB_TextSpeed.SelectedIndex = sav1.TextSpeed;
|
||||
}
|
||||
|
||||
if (SAV is SAV2)
|
||||
{
|
||||
SAV2 sav2 = (SAV2)SAV;
|
||||
MT_Coins.Text = sav2.Coin.ToString();
|
||||
badgeval = sav2.Badges;
|
||||
|
||||
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 +166,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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue