Merge pull request #3 from kwsch/master

Update
This commit is contained in:
ajtudela 2016-08-31 11:06:31 +02:00 committed by GitHub
commit 37ccfff25f
66 changed files with 5308 additions and 759 deletions

View file

@ -525,7 +525,7 @@ namespace PKHeX
if (lvl >= pk6.Met_Level && lvl >= evo.Level)
dl.Add(new DexLevel {Species = evo.Species, Level = lvl});
else break;
if (evo.Level > 1) // Level Up (from previous level)
if (evo.Level > 2) // Level Up (from previous level)
lvl--;
}
return dl;

View file

@ -245,7 +245,6 @@
this.Menu_ModifyPKM = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_Unicode = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_About = new System.Windows.Forms.ToolStripMenuItem();
this.L_Save = new System.Windows.Forms.Label();
this.tabBoxMulti = new System.Windows.Forms.TabControl();
this.Tab_Box = new System.Windows.Forms.TabPage();
this.PAN_Box = new System.Windows.Forms.Panel();
@ -348,10 +347,10 @@
this.B_OpenOPowers = new System.Windows.Forms.Button();
this.B_OpenEventFlags = new System.Windows.Forms.Button();
this.B_OpenPokedex = new System.Windows.Forms.Button();
this.B_OpenBerryField = new System.Windows.Forms.Button();
this.B_OpenSecretBase = new System.Windows.Forms.Button();
this.B_Pokeblocks = new System.Windows.Forms.Button();
this.B_LinkInfo = new System.Windows.Forms.Button();
this.B_OpenBerryField = new System.Windows.Forms.Button();
this.B_Pokeblocks = new System.Windows.Forms.Button();
this.B_OpenSecretBase = new System.Windows.Forms.Button();
this.B_OpenPokepuffs = new System.Windows.Forms.Button();
this.B_OpenSuperTraining = new System.Windows.Forms.Button();
this.B_OpenHallofFame = new System.Windows.Forms.Button();
@ -363,6 +362,7 @@
this.mnuLQR = new System.Windows.Forms.ToolStripMenuItem();
this.mnuLSave = new System.Windows.Forms.ToolStripMenuItem();
this.PB_Legal = new System.Windows.Forms.PictureBox();
this.L_UpdateAvailable = new System.Windows.Forms.LinkLabel();
this.tabMain.SuspendLayout();
this.Tab_Main.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.Label_IsShiny)).BeginInit();
@ -926,6 +926,7 @@
this.TB_Nickname.Name = "TB_Nickname";
this.TB_Nickname.Size = new System.Drawing.Size(122, 20);
this.TB_Nickname.TabIndex = 5;
this.TB_Nickname.TextChanged += new System.EventHandler(this.updateIsNicknamed);
this.TB_Nickname.MouseDown += new System.Windows.Forms.MouseEventHandler(this.updateNicknameClick);
//
// CB_Species
@ -2985,16 +2986,6 @@
this.Menu_About.Text = "About &PKHeX";
this.Menu_About.Click += new System.EventHandler(this.mainMenuAbout);
//
// L_Save
//
this.L_Save.AutoSize = true;
this.L_Save.Location = new System.Drawing.Point(300, 5);
this.L_Save.Name = "L_Save";
this.L_Save.Size = new System.Drawing.Size(54, 13);
this.L_Save.TabIndex = 4;
this.L_Save.Text = "SAV: N/A";
this.L_Save.Click += new System.EventHandler(this.clickSaveFileName);
//
// tabBoxMulti
//
this.tabBoxMulti.Controls.Add(this.Tab_Box);
@ -3007,6 +2998,7 @@
this.tabBoxMulti.Size = new System.Drawing.Size(310, 225);
this.tabBoxMulti.TabIndex = 50;
this.tabBoxMulti.Click += new System.EventHandler(this.clickBoxSort);
this.tabBoxMulti.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.clickBoxDouble);
//
// Tab_Box
//
@ -4454,6 +4446,16 @@
this.B_OpenPokedex.UseVisualStyleBackColor = true;
this.B_OpenPokedex.Click += new System.EventHandler(this.B_OpenPokedex_Click);
//
// B_LinkInfo
//
this.B_LinkInfo.Location = new System.Drawing.Point(96, 61);
this.B_LinkInfo.Name = "B_LinkInfo";
this.B_LinkInfo.Size = new System.Drawing.Size(87, 23);
this.B_LinkInfo.TabIndex = 23;
this.B_LinkInfo.Text = "Link Data";
this.B_LinkInfo.UseVisualStyleBackColor = true;
this.B_LinkInfo.Click += new System.EventHandler(this.B_LinkInfo_Click);
//
// B_OpenBerryField
//
this.B_OpenBerryField.Location = new System.Drawing.Point(189, 61);
@ -4464,17 +4466,6 @@
this.B_OpenBerryField.UseVisualStyleBackColor = true;
this.B_OpenBerryField.Click += new System.EventHandler(this.B_OpenBerryField_Click);
//
// B_OpenSecretBase
//
this.B_OpenSecretBase.Location = new System.Drawing.Point(96, 90);
this.B_OpenSecretBase.Name = "B_OpenSecretBase";
this.B_OpenSecretBase.Size = new System.Drawing.Size(87, 23);
this.B_OpenSecretBase.TabIndex = 21;
this.B_OpenSecretBase.Text = "Secret Base";
this.B_OpenSecretBase.UseVisualStyleBackColor = true;
this.B_OpenSecretBase.Visible = false;
this.B_OpenSecretBase.Click += new System.EventHandler(this.B_OpenSecretBase_Click);
//
// B_Pokeblocks
//
this.B_Pokeblocks.Location = new System.Drawing.Point(3, 90);
@ -4486,15 +4477,16 @@
this.B_Pokeblocks.Visible = false;
this.B_Pokeblocks.Click += new System.EventHandler(this.B_OpenPokeblocks_Click);
//
// B_LinkInfo
// B_OpenSecretBase
//
this.B_LinkInfo.Location = new System.Drawing.Point(96, 61);
this.B_LinkInfo.Name = "B_LinkInfo";
this.B_LinkInfo.Size = new System.Drawing.Size(87, 23);
this.B_LinkInfo.TabIndex = 23;
this.B_LinkInfo.Text = "Link Data";
this.B_LinkInfo.UseVisualStyleBackColor = true;
this.B_LinkInfo.Click += new System.EventHandler(this.B_LinkInfo_Click);
this.B_OpenSecretBase.Location = new System.Drawing.Point(96, 90);
this.B_OpenSecretBase.Name = "B_OpenSecretBase";
this.B_OpenSecretBase.Size = new System.Drawing.Size(87, 23);
this.B_OpenSecretBase.TabIndex = 21;
this.B_OpenSecretBase.Text = "Secret Base";
this.B_OpenSecretBase.UseVisualStyleBackColor = true;
this.B_OpenSecretBase.Visible = false;
this.B_OpenSecretBase.Click += new System.EventHandler(this.B_OpenSecretBase_Click);
//
// B_OpenPokepuffs
//
@ -4603,16 +4595,28 @@
this.PB_Legal.TabStop = false;
this.PB_Legal.Click += new System.EventHandler(this.clickLegality);
//
// L_UpdateAvailable
//
this.L_UpdateAvailable.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.L_UpdateAvailable.Location = new System.Drawing.Point(305, 5);
this.L_UpdateAvailable.Name = "L_UpdateAvailable";
this.L_UpdateAvailable.Size = new System.Drawing.Size(300, 13);
this.L_UpdateAvailable.TabIndex = 102;
this.L_UpdateAvailable.TabStop = true;
this.L_UpdateAvailable.Text = "New Update Available!";
this.L_UpdateAvailable.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.L_UpdateAvailable.Visible = false;
//
// Main
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(614, 361);
this.Controls.Add(this.L_UpdateAvailable);
this.Controls.Add(this.PB_Legal);
this.Controls.Add(this.dragout);
this.Controls.Add(this.tabBoxMulti);
this.Controls.Add(this.L_Save);
this.Controls.Add(this.tabMain);
this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.GB_SAVtools);
@ -4883,7 +4887,6 @@
private System.Windows.Forms.Label L_Characteristic;
private System.Windows.Forms.TextBox TB_IVTotal;
private System.Windows.Forms.Label L_Potential;
private System.Windows.Forms.Label L_Save;
private System.Windows.Forms.TabControl tabBoxMulti;
private System.Windows.Forms.TabPage Tab_Box;
private System.Windows.Forms.TabPage Tab_PartyBattle;
@ -5084,6 +5087,7 @@
private System.Windows.Forms.FlowLayoutPanel FLP_PKMEditors;
private System.Windows.Forms.Button B_LinkInfo;
private System.Windows.Forms.Button B_CGearSkin;
private System.Windows.Forms.LinkLabel L_UpdateAvailable;
}
}

File diff suppressed because it is too large Load diff

View file

@ -877,9 +877,6 @@
<metadata name="menuStrip1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Save.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tabBoxMulti.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -1332,6 +1329,9 @@
SiSLGvswRQAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="L_UpdateAvailable.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

125
PKHeX/MainWindow/MainPK1.cs Normal file
View file

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

View file

@ -134,6 +134,14 @@ namespace PKHeX
{
int[] abils = SAV.Personal.getAbilities(pk4.Species, pk4.AltForm);
int abil = Array.IndexOf(abils, pk4.Ability);
if (abil < 0)
CB_Ability.SelectedIndex = 0;
else if (abil == 2)
CB_Ability.SelectedIndex = 2;
else if (abils[0] == abils[1] || abils[1] == 0)
CB_Ability.SelectedIndex = pk4.PIDAbility;
else
CB_Ability.SelectedIndex = abil < 0 || abil >= CB_Ability.Items.Count ? 0 : abil;
}
}

View file

@ -145,6 +145,14 @@ namespace PKHeX
{
int[] abils = SAV.Personal.getAbilities(pk5.Species, pk5.AltForm);
int abil = Array.IndexOf(abils, pk5.Ability);
if (abil < 0)
CB_Ability.SelectedIndex = 0;
else if (abil == 2)
CB_Ability.SelectedIndex = 2;
else if (abils[0] == abils[1] || abils[1] == 0)
CB_Ability.SelectedIndex = pk5.PIDAbility;
else
CB_Ability.SelectedIndex = abil < 0 || abil >= CB_Ability.Items.Count ? 0 : abil;
}
}

View file

@ -1,7 +1,5 @@
using System;
using System.Drawing;
using System.IO;
using System.Net;
using System.Web;
using System.Windows.Forms;
@ -57,10 +55,7 @@ namespace PKHeX
string webURL = "http://api.qrserver.com/v1/read-qr-code/?fileurl=" + HttpUtility.UrlEncode(address);
try
{
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(webURL);
HttpWebResponse httpWebReponse = (HttpWebResponse)httpWebRequest.GetResponse();
var reader = new StreamReader(httpWebReponse.GetResponseStream());
string data = reader.ReadToEnd();
string data = Util.getStringFromURL(webURL);
if (data.Contains("could not find")) { Util.Alert("Reader could not find QR data in the image."); return null; }
if (data.Contains("filetype not supported")) { Util.Alert("Input URL is not valid. Double check that it is an image (jpg/png).", address); return null; }
// Quickly convert the json response to a data string
@ -82,10 +77,7 @@ namespace PKHeX
try
{
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(webURL);
HttpWebResponse httpWebReponse = (HttpWebResponse)httpWebRequest.GetResponse();
Stream stream = httpWebReponse.GetResponseStream();
if (stream != null) return Image.FromStream(stream);
return Util.getImageFromURL(webURL);
}
catch
{

View file

@ -116,12 +116,12 @@ namespace PKHeX
}
}
private GiftType Type { get { return (GiftType)Data[0]; } set {Data[0] = (byte)value; } }
public bool IsHatched => Type == GiftType.Pokémon;
public bool IsEgg => Type == GiftType.PokémonEgg;
public bool IsManaphyEgg => Type == GiftType.ManaphyEgg;
public override bool IsItem { get { return Type == GiftType.Item; } set { if (value) CardType = (int)GiftType.Item; } }
public override bool IsPokémon { get { return Type == GiftType.Pokémon || Type == GiftType.PokémonEgg || Type == GiftType.ManaphyEgg; } set { } }
private GiftType PGTGiftType { get { return (GiftType)Data[0]; } set {Data[0] = (byte)value; } }
public bool IsHatched => PGTGiftType == GiftType.Pokémon;
public bool IsEgg => PGTGiftType == GiftType.PokémonEgg;
public bool IsManaphyEgg => PGTGiftType == GiftType.ManaphyEgg;
public override bool IsItem { get { return PGTGiftType == GiftType.Item; } set { if (value) CardType = (int)GiftType.Item; } }
public override bool IsPokémon { get { return PGTGiftType == GiftType.Pokémon || PGTGiftType == GiftType.PokémonEgg || PGTGiftType == GiftType.ManaphyEgg; } set { } }
public override PKM convertToPKM(SaveFile SAV)
{

View file

@ -73,6 +73,9 @@
<Compile Include="Legality\Tables3.cs" />
<Compile Include="Legality\Tables5.cs" />
<Compile Include="Legality\Tables4.cs" />
<Compile Include="MainWindow\MainPK1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainWindow\MainPK6.cs">
<SubType>Form</SubType>
</Compile>
@ -90,11 +93,13 @@
<Compile Include="PersonalInfo\PersonalInfo.cs" />
<Compile Include="PersonalInfo\PersonalInfoB2W2.cs" />
<Compile Include="PersonalInfo\PersonalInfoBW.cs" />
<Compile Include="PersonalInfo\PersonalInfoG1.cs" />
<Compile Include="PersonalInfo\PersonalInfoG3.cs" />
<Compile Include="PersonalInfo\PersonalInfoG4.cs" />
<Compile Include="PersonalInfo\PersonalInfoORAS.cs" />
<Compile Include="PersonalInfo\PersonalInfoXY.cs" />
<Compile Include="PersonalInfo\PersonalTable.cs" />
<Compile Include="PKM\PK1.cs" />
<Compile Include="PKM\PKM.cs" />
<Compile Include="PKM\PKMConverter.cs" />
<Compile Include="PKM\ShowdownSet.cs" />
@ -114,6 +119,7 @@
<Compile Include="Saves\BlockInfo.cs" />
<Compile Include="Saves\BoxWallpaper.cs" />
<Compile Include="Saves\Inventory.cs" />
<Compile Include="Saves\SAV1.cs" />
<Compile Include="Saves\SAV3.cs" />
<Compile Include="Saves\SAV4.cs" />
<Compile Include="Saves\SAV5.cs" />
@ -189,6 +195,18 @@
<Compile Include="Subforms\Save Editors\Gen6\SAV_PokeBlockORAS.Designer.cs">
<DependentUpon>SAV_PokeBlockORAS.cs</DependentUpon>
</Compile>
<Compile Include="Subforms\Save Editors\SAV_BoxViewer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Subforms\Save Editors\SAV_BoxViewer.Designer.cs">
<DependentUpon>SAV_BoxViewer.cs</DependentUpon>
</Compile>
<Compile Include="Subforms\Save Editors\SAV_SimplePokedex.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Subforms\Save Editors\SAV_SimplePokedex.Designer.cs">
<DependentUpon>SAV_SimplePokedex.cs</DependentUpon>
</Compile>
<Compile Include="Subforms\SAV_Database.cs">
<SubType>Form</SubType>
</Compile>
@ -294,10 +312,12 @@
<DependentUpon>SplashScreen.cs</DependentUpon>
</Compile>
<Compile Include="Misc\ComboItem.cs" />
<Compile Include="Util\ByteUtil.cs" />
<Compile Include="Util\DataUtil.cs" />
<Compile Include="Util\DateUtil.cs" />
<Compile Include="Util\FormUtil.cs" />
<Compile Include="Util\ImageUtil.cs" />
<Compile Include="Util\NetUtil.cs" />
<Compile Include="Util\PathUtil.cs" />
<Compile Include="Util\RandUtil.cs" />
<Compile Include="Util\ReflectUtil.cs" />
@ -338,6 +358,12 @@
<EmbeddedResource Include="Subforms\Save Editors\Gen6\SAV_PokeBlockORAS.resx">
<DependentUpon>SAV_PokeBlockORAS.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Save Editors\SAV_BoxViewer.resx">
<DependentUpon>SAV_BoxViewer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Save Editors\SAV_SimplePokedex.resx">
<DependentUpon>SAV_SimplePokedex.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\SAV_Database.resx">
<DependentUpon>SAV_Database.cs</DependentUpon>
</EmbeddedResource>
@ -451,6 +477,7 @@
<None Include="Resources\byte\personal_hgss" />
<None Include="Resources\byte\personal_lg" />
<None Include="Resources\byte\personal_pt" />
<None Include="Resources\byte\personal_rby" />
<None Include="Resources\byte\personal_rs" />
<None Include="Resources\byte\personal_xy" />
<None Include="Resources\byte\wc6.pkl" />
@ -2704,7 +2731,15 @@
<None Include="Resources\img\ribbons\artist.png" />
<None Include="Resources\img\ribbons\alert.png" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="Resources\img\box\slotDrag.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\img\box\swapBox.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\text\version.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

393
PKHeX/PKM/PK1.cs Normal file
View file

@ -0,0 +1,393 @@
using System;
using System.Linq;
namespace PKHeX
{
public class PK1 : 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_1PARTY;
public override int SIZE_STORED => PKX.SIZE_1STORED;
internal const int STRLEN_J = 6;
internal const int STRLEN_U = 11;
private int StringLength => Japanese ? STRLEN_J : STRLEN_U;
public override int Format => 1;
public bool Japanese => otname.Length == STRLEN_J;
public override string FileName => $"{Species.ToString("000")} - {Nickname} - {OT_Name}.{Extension}";
public PK1(byte[] decryptedData = null, string ident = null, bool jp = false)
{
Data = (byte[])(decryptedData ?? new byte[SIZE_PARTY]).Clone();
Identifier = ident;
if (Data.Length != SIZE_PARTY)
Array.Resize(ref Data, SIZE_PARTY);
int strLen = jp ? STRLEN_J : STRLEN_U;
otname = Enumerable.Repeat((byte) 0x50, strLen).ToArray();
nick = Enumerable.Repeat((byte) 0x50, strLen).ToArray();
}
public override PKM Clone()
{
PK1 new_pk1 = new PK1(Data, Identifier, Japanese);
Array.Copy(otname, 0, new_pk1.otname, 0, otname.Length);
Array.Copy(nick, 0, new_pk1.nick, 0, nick.Length);
return new_pk1;
}
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 PK1");
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 PokemonList1(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 PKX.getG1Species(Data[0]); }
set
{
// Before updating catch rate, check if Special Yellow Version Pikachu
if (!(PKX.getG1Species(Data[0]) == 25 && value == 25 && Catch_Rate == 163))
Catch_Rate = PersonalTable.RBY[value].CatchRate;
Data[0] = (byte)PKX.setG1Species(value);
Type_A = PersonalTable.RBY[value].Types[0];
Type_B = PersonalTable.RBY[value].Types[1];
}
}
public override int Stat_HPCurrent { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x1)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x1); } }
public int Status_Condition { get { return Data[4]; } set { Data[4] = (byte)value; } }
public int Type_A { get { return Data[5]; } set { Data[5] = (byte)value; } }
public int Type_B { get { return Data[6]; } set { Data[6] = (byte)value; } }
public int Catch_Rate { get { return Data[7]; } set { Data[7] = (byte)value; } }
public override int Move1 { get { return Data[8]; } set { Data[8] = (byte) value; } }
public override int Move2 { get { return Data[9]; } set { Data[9] = (byte)value; } }
public override int Move3 { get { return Data[10]; } set { Data[10] = (byte)value; } }
public override int Move4 { get { return Data[11]; } set { Data[11] = (byte)value; } }
public override int TID { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0xC)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0xC); } }
public override uint EXP
{
get { return (Util.SwapEndianness(BitConverter.ToUInt32(Data, 0xE)) >> 8) & 0x00FFFFFF; }
set { Array.Copy(BitConverter.GetBytes(Util.SwapEndianness((value << 8) & 0xFFFFFF00)), 0, Data, 0xE, 3); }
}
public override int EV_HP { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x11)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x11); } }
public override int EV_ATK { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x13)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x13); } }
public override int EV_DEF { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x15)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x15); } }
public override int EV_SPE { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x17)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x17); } }
public int EV_SPC { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x19)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x19); } }
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, 0x1B)); } set { BitConverter.GetBytes(Util.SwapEndianness(value)).CopyTo(Data, 0x1B); } }
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[0x1D] & 0x3F; } set { Data[0x1D] = (byte)((Data[0x1D] & 0xC0) | (value & 0x3F)); } }
public override int Move2_PP { get { return Data[0x1E] & 0x3F; } set { Data[0x1E] = (byte)((Data[0x1E] & 0xC0) | (value & 0x3F)); } }
public override int Move3_PP { get { return Data[0x1F] & 0x3F; } set { Data[0x1F] = (byte)((Data[0x1F] & 0xC0) | (value & 0x3F)); } }
public override int Move4_PP { get { return Data[0x20] & 0x3F; } set { Data[0x20] = (byte)((Data[0x20] & 0xC0) | (value & 0x3F)); } }
public override int Move1_PPUps { get { return (Data[0x1D] & 0xC0) >> 6; } set { Data[0x1D] = (byte)((Data[0x1D] & 0x3F) | ((value & 0x3) << 6)); } }
public override int Move2_PPUps { get { return (Data[0x1E] & 0xC0) >> 6; } set { Data[0x1E] = (byte)((Data[0x1E] & 0x3F) | ((value & 0x3) << 6)); } }
public override int Move3_PPUps { get { return (Data[0x1F] & 0xC0) >> 6; } set { Data[0x1F] = (byte)((Data[0x1F] & 0x3F) | ((value & 0x3) << 6)); } }
public override int Move4_PPUps { get { return (Data[0x20] & 0xC0) >> 6; } set { Data[0x20] = (byte)((Data[0x20] & 0x3F) | ((value & 0x3) << 6)); } }
#endregion
#region Party Attributes
public override int Stat_Level
{
get { return Data[0x21]; }
set { Data[0x21] = (byte)value; Data[0x3] = (byte)value; }
}
public override int Stat_HPMax { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x22)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x22); } }
public override int Stat_ATK { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x24)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x24); } }
public override int Stat_DEF { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x26)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x26); } }
public override int Stat_SPE { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x28)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x28); } }
public int Stat_SPC { get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, 0x2A)); } set { BitConverter.GetBytes(Util.SwapEndianness((ushort)value)).CopyTo(Data, 0x2A); } }
// Leave SPA and SPD as alias for SPC
public override int Stat_SPA { get { return Stat_SPC; } set { Stat_SPC = value; } }
public override int Stat_SPD { get { return Stat_SPC; } set { } }
#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;
}
#region Future, Unused Attributes
public override bool getGenderIsValid()
{
return true;
}
public override uint EncryptionConstant { get { return 0; } set { } }
public override uint PID { get { return 0; } set { } }
public override int Met_Level { get { return 0; } set { } }
public override int Nature { get { return 0; } set { } }
public override int AltForm { get { return 0; } set { } }
public override bool IsEgg { get { return false; } set { } }
public override int Gender { get { return 0; } set { } }
public override int HeldItem { get { return 0; } set { } }
public override bool CanHoldItem(ushort[] ValidArray)
{
return false;
}
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 CurrentFriendship { get { return 0; } set { } }
public override int Ability { get { return 0; } set { } }
public override int CurrentHandler { get { return 0; } set { } }
public override int Met_Location { 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 OT_Gender { 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 PKRS_Strain { get { return 0; } set { } }
public override int PKRS_Days { get { return 0; } set { } }
public override int CNT_Cool { get { return 0; } set { } }
public override int CNT_Beauty { get { return 0; } set { } }
public override int CNT_Cute { get { return 0; } set { } }
public override int CNT_Smart { get { return 0; } set { } }
public override int CNT_Tough { get { return 0; } set { } }
public override int CNT_Sheen { get { return 0; } set { } }
#endregion
}
public class 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 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,
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_1PARTY
: PKX.SIZE_1STORED;
}
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 ? PK1.STRLEN_J : PK1.STRLEN_U) * 2 * cap)).ToArray();
}
public PokemonList1(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 PK1[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 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()
};
}
}
public PokemonList1(CapacityType c = CapacityType.Single, bool jp = false)
: this(null, c, jp)
{
Count = 1;
}
public PokemonList1(PK1 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 PK1[] Pokemon;
public PK1 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] = (PK1)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] = (byte)PKX.setG1Species(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 ? PK1.STRLEN_J : PK1.STRLEN_U)) + 2;
}
}
}

View file

@ -415,10 +415,10 @@ namespace PKHeX
};
// Fix PP
pk5.Move1_PP = pk5.getMovePP(pk5.Move1_PP, pk5.Move1_PPUps);
pk5.Move2_PP = pk5.getMovePP(pk5.Move2_PP, pk5.Move2_PPUps);
pk5.Move3_PP = pk5.getMovePP(pk5.Move3_PP, pk5.Move3_PPUps);
pk5.Move4_PP = pk5.getMovePP(pk5.Move4_PP, pk5.Move4_PPUps);
pk5.Move1_PP = pk5.getMovePP(pk5.Move1, pk5.Move1_PPUps);
pk5.Move2_PP = pk5.getMovePP(pk5.Move2, pk5.Move2_PPUps);
pk5.Move3_PP = pk5.getMovePP(pk5.Move3, pk5.Move3_PPUps);
pk5.Move4_PP = pk5.getMovePP(pk5.Move4, pk5.Move4_PPUps);
// Disassociate Nature and PID
pk5.Nature = (int)(pk5.PID % 25);

View file

@ -273,7 +273,8 @@ namespace PKHeX
get { return BitConverter.ToUInt16(Data, 0x70); }
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x70); }
}
public bool SecretSuperTraining { get { return Data[0x72] == 1; } set { Data[0x72] = (byte)((Data[0x72] & ~1) | (value ? 1 : 0)); } }
public bool SecretSuperTrainingUnlocked { get { return (Data[0x72] & 1) == 1; } set { Data[0x72] = (byte)((Data[0x72] & ~1) | (value ? 1 : 0)); } }
public bool SecretSuperTrainingComplete { get { return (Data[0x72] & 2) == 2; } set { Data[0x72] = (byte)((Data[0x72] & ~2) | (value ? 2 : 0)); } }
public byte _0x73 { get { return Data[0x73]; } set { Data[0x73] = value; } }
private uint IV32 { get { return BitConverter.ToUInt32(Data, 0x74); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x74); } }
public override int IV_HP { get { return (int)(IV32 >> 00) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 00)) | (uint)((value > 31 ? 31 : value) << 00)); } }
@ -411,18 +412,6 @@ namespace PKHeX
public bool IsUntraded => string.IsNullOrWhiteSpace(HT_Name);
public bool IsUntradedEvent6 => Geo1_Country == 0 && Geo1_Region == 0 && Met_Location / 10000 == 4 && Gen6;
public int[] RelearnMoves
{
get { return new[] { RelearnMove1, RelearnMove2, RelearnMove3, RelearnMove4 }; }
set
{
if (value.Length > 0) RelearnMove1 = value[0];
if (value.Length > 1) RelearnMove2 = value[1];
if (value.Length > 2) RelearnMove3 = value[2];
if (value.Length > 3) RelearnMove4 = value[3];
}
}
// Complex Generated Attributes
public override int Characteristic

View file

@ -16,10 +16,10 @@ namespace PKHeX
public int Box { get; set; } = -1; // Batch Editor
public int Slot { get; set; } = -1; // Batch Editor
public byte[] EncryptedPartyData => Encrypt().Take(SIZE_PARTY).ToArray();
public byte[] EncryptedBoxData => Encrypt().Take(SIZE_STORED).ToArray();
public byte[] DecryptedPartyData => Write().Take(SIZE_PARTY).ToArray();
public byte[] DecryptedBoxData => Write().Take(SIZE_STORED).ToArray();
public virtual byte[] EncryptedPartyData => Encrypt().Take(SIZE_PARTY).ToArray();
public virtual byte[] EncryptedBoxData => Encrypt().Take(SIZE_STORED).ToArray();
public virtual byte[] DecryptedPartyData => Write().Take(SIZE_PARTY).ToArray();
public virtual byte[] DecryptedBoxData => Write().Take(SIZE_STORED).ToArray();
protected ushort CalculateChecksum()
{
@ -250,7 +250,7 @@ namespace PKHeX
}
public bool PKRS_Infected => PKRS_Strain > 0;
public bool PKRS_Cured => PKRS_Days == 0 && PKRS_Strain > 0;
public bool ChecksumValid => Checksum == CalculateChecksum();
public virtual bool ChecksumValid => Checksum == CalculateChecksum();
public int CurrentLevel => PKX.getLevel(Species, EXP);
public bool MarkCircle { get { return (MarkByte & (1 << 0)) == 1 << 0; } set { MarkByte = (byte)(MarkByte & ~(1 << 0) | (value ? 1 << 0 : 0)); } }
public bool MarkTriangle { get { return (MarkByte & (1 << 1)) == 1 << 1; } set { MarkByte = (byte)(MarkByte & ~(1 << 0) | (value ? 1 << 0 : 0)); } }
@ -261,7 +261,7 @@ namespace PKHeX
public Image Sprite => PKX.getSprite(this);
public string ShowdownText => ShowdownSet.getShowdownText(this);
public string[] QRText => PKX.getQRText(this);
public string FileName => $"{Species.ToString("000")}{(IsShiny ? " " : "")} - {Nickname} - {Checksum.ToString("X4")}{EncryptionConstant.ToString("X8")}.{Extension}";
public virtual string FileName => $"{Species.ToString("000")}{(IsShiny ? " " : "")} - {Nickname} - {Checksum.ToString("X4")}{EncryptionConstant.ToString("X8")}.{Extension}";
public int[] IVs
{
get { return new[] { IV_HP, IV_ATK, IV_DEF, IV_SPE, IV_SPA, IV_SPD }; }
@ -287,6 +287,28 @@ namespace PKHeX
get { return new[] { Move1, Move2, Move3, Move4 }; }
set { if (value?.Length != 4) return; Move1 = value[0]; Move2 = value[1]; Move3 = value[2]; Move4 = value[3]; }
}
public int[] RelearnMoves
{
get { return new[] { RelearnMove1, RelearnMove2, RelearnMove3, RelearnMove4 }; }
set
{
if (value.Length > 0) RelearnMove1 = value[0];
if (value.Length > 1) RelearnMove2 = value[1];
if (value.Length > 2) RelearnMove3 = value[2];
if (value.Length > 3) RelearnMove4 = value[3];
}
}
public int PIDAbility
{
get
{
if (GenNumber > 5 || Format > 5)
return -1;
if (GenNumber == 5)
return (int)((PID >> 16) & 1);
return (int)(PID & 1);
}
}
public bool[] Markings
{
@ -331,29 +353,42 @@ namespace PKHeX
public abstract bool getGenderIsValid();
public void RefreshChecksum() { Checksum = CalculateChecksum(); }
public void FixMoves()
{
ReorderMoves();
if (Move1 == 0) { Move1_PP = 0; Move1_PPUps = 0; }
if (Move2 == 0) { Move2_PP = 0; Move2_PPUps = 0; }
if (Move3 == 0) { Move3_PP = 0; Move3_PPUps = 0; }
if (Move4 == 0) { Move4_PP = 0; Move4_PPUps = 0; }
}
private void ReorderMoves()
{
if (Move4 != 0 && Move3 == 0)
{
Move3 = Move4;
Move3_PP = Move4_PP;
Move3_PPUps = Move4_PPUps;
Move4 = Move4_PP = Move4_PPUps = 0;
Move4 = 0;
}
if (Move3 != 0 && Move2 == 0)
{
Move2 = Move3;
Move2_PP = Move3_PP;
Move2_PPUps = Move3_PPUps;
Move3 = Move3_PP = Move3_PPUps = 0;
Move3 = 0;
ReorderMoves();
}
if (Move2 != 0 && Move1 == 0)
{
Move1 = Move2;
Move1_PP = Move2_PP;
Move1_PPUps = Move2_PPUps;
Move2 = Move2_PP = Move2_PPUps = 0;
Move2 = 0;
ReorderMoves();
}
}
public int PotentialRating
{
get
@ -367,7 +402,7 @@ namespace PKHeX
}
}
public ushort[] getStats(PersonalInfo p)
public virtual ushort[] getStats(PersonalInfo p)
{
int level = CurrentLevel;
ushort[] Stats = new ushort[6];
@ -441,5 +476,9 @@ namespace PKHeX
if (GenNumber < 6)
EncryptionConstant = PID;
}
public void setPIDUnown3(int form)
{
do PID = Util.rnd32(); while (PKX.getUnownForm(PID) != form);
}
}
}

View file

@ -31,6 +31,9 @@ namespace PKHeX
switch (data.Length)
{
case PKX.SIZE_1JLIST:
case PKX.SIZE_1ULIST:
return 1;
case PKX.SIZE_3PARTY:
case PKX.SIZE_3STORED:
return 3;
@ -70,6 +73,11 @@ namespace PKHeX
checkEncrypted(ref data);
switch (getPKMDataFormat(data))
{
case 1:
var PL = new PokemonList1(data, PokemonList1.CapacityType.Single, data.Length == PKX.SIZE_1JLIST);
if (ident != null)
PL[0].Identifier = ident;
return PL[0];
case 3:
return new PK3(data, ident);
case 4:
@ -101,6 +109,17 @@ namespace PKHeX
+ "Desired Format: " + Format;
return null;
}
if ((pk.Format == 1 || pk.Format == 2) && 2 < Format && Format < 7)
{
comment = $"Cannot convert a PK{pk.Format} to a PK{Format}.";
return null;
}
if (pk.Format == 1 && Format == 7)
{
comment = "PK1 to PK7 conversion is not yet supported." + Environment.NewLine
+ "Please wait for Sun/Moon to release and documentation to occur.";
return null;
}
string currentFormat = pk.Format.ToString();
PKM pkm = pk.Clone();
if (pkm.IsEgg) // force hatch
@ -130,6 +149,7 @@ namespace PKHeX
ushort chk = 0;
switch (format)
{
case 1:
case 3: // TOneverDO, nobody exports encrypted pk3s
return;
case 4:

View file

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Text;
using System.Linq;
@ -9,6 +10,11 @@ namespace PKHeX
{
public static class PKX
{
internal const int SIZE_1ULIST = 69;
internal const int SIZE_1JLIST = 59;
internal const int SIZE_1PARTY = 44;
internal const int SIZE_1STORED = 33;
internal const int SIZE_3PARTY = 100;
internal const int SIZE_3STORED = 80;
internal const int SIZE_3BLOCK = 12;
@ -32,7 +38,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_3STORED, SIZE_3PARTY, SIZE_4STORED, SIZE_4PARTY, SIZE_5PARTY, SIZE_6STORED, SIZE_6PARTY}.Contains((int)len);
return new[] {SIZE_1JLIST, SIZE_1ULIST, SIZE_3STORED, SIZE_3PARTY, SIZE_4STORED, SIZE_4PARTY, SIZE_5PARTY, SIZE_6STORED, SIZE_6PARTY}.Contains((int)len);
}
// C# PKX Function Library
@ -188,10 +194,13 @@ namespace PKHeX
public static readonly PersonalTable Personal = PersonalTable.AO;
// Stat Fetching
public static byte[] getRandomEVs()
public static uint[] getRandomEVs(int Generation = 6)
{
if (Generation > 2)
{
uint[] evs = new uint[6];
do
{
byte[] evs = new byte[6];
do {
evs[0] = (byte)Math.Min(Util.rnd32() % 300, 252); // bias two to get maybe 252
evs[1] = (byte)Math.Min(Util.rnd32() % 300, 252);
evs[2] = (byte)Math.Min(Util.rnd32() % (510 - evs[0] - evs[1]), 252);
@ -202,6 +211,14 @@ namespace PKHeX
Util.Shuffle(evs);
return evs;
}
else
{
uint[] evs = new uint[6];
for (int i = 0; i < evs.Length; i++)
evs[i] = Util.rnd32()%0x10000;
return evs;
}
}
public static int getLevel(int species, uint exp)
{
int growth = Personal[species].EXPGrowth;
@ -1617,5 +1634,545 @@ namespace PKHeX
return 0xFFFF;
return arr[g3val];
}
#region Gen 1 Character Tables
private static Dictionary<byte, string> RBY2U_U => new Dictionary<byte, string>{
{0x50, "\0"},
{0x5D, "[TRAINER]"},
{0x7F, " "},
{0x80, "A"},
{0x81, "B"},
{0x82, "C"},
{0x83, "D"},
{0x84, "E"},
{0x85, "F"},
{0x86, "G"},
{0x87, "H"},
{0x88, "I"},
{0x89, "J"},
{0x8A, "K"},
{0x8B, "L"},
{0x8C, "M"},
{0x8D, "N"},
{0x8E, "O"},
{0x8F, "P"},
{0x90, "Q"},
{0x91, "R"},
{0x92, "S"},
{0x93, "T"},
{0x94, "U"},
{0x95, "V"},
{0x96, "W"},
{0x97, "X"},
{0x98, "Y"},
{0x99, "Z"},
{0x9A, "["},
{0x9B, "\\"},
{0x9C, "]"},
{0x9D, "^"},
{0x9E, "_"},
{0x9F, "`"},
{0xA0, "a"},
{0xA1, "b"},
{0xA2, "c"},
{0xA3, "d"},
{0xA4, "e"},
{0xA5, "f"},
{0xA6, "g"},
{0xA7, "h"},
{0xA8, "i"},
{0xA9, "j"},
{0xAA, "k"},
{0xAB, "l"},
{0xAC, "m"},
{0xAD, "n"},
{0xAE, "o"},
{0xAF, "p"},
{0xB0, "q"},
{0xB1, "r"},
{0xB2, "s"},
{0xB3, "t"},
{0xB4, "u"},
{0xB5, "v"},
{0xB6, "w"},
{0xB7, "x"},
{0xB8, "y"},
{0xB9, "z"},
{0xE1, "{"}, /* Pk */
{0xE2, "}"}, /* Mn */
{0xE3, "-"},
{0xE6, "?"},
{0xE7, "!"},
{0xEF, "♂"},
{0xF2, "."},
{0xF3, "/"},
{0xF4, ","},
{0xF5, "♀"},
{0xF6, "0"},
{0xF7, "1"},
{0xF8, "2"},
{0xF9, "3"},
{0xFA, "4"},
{0xFB, "5"},
{0xFC, "6"},
{0xFD, "7"},
{0xFE, "8"},
{0xFF, "9"}
};
private static Dictionary<string, byte> U2RBY_U => new Dictionary<string, byte> {
{"\0", 0x50},
{"[TRAINER]", 0x5D},
{" ", 0x7F},
{"A", 0x80},
{"B", 0x81},
{"C", 0x82},
{"D", 0x83},
{"E", 0x84},
{"F", 0x85},
{"G", 0x86},
{"H", 0x87},
{"I", 0x88},
{"J", 0x89},
{"K", 0x8A},
{"L", 0x8B},
{"M", 0x8C},
{"N", 0x8D},
{"O", 0x8E},
{"P", 0x8F},
{"Q", 0x90},
{"R", 0x91},
{"S", 0x92},
{"T", 0x93},
{"U", 0x94},
{"V", 0x95},
{"W", 0x96},
{"X", 0x97},
{"Y", 0x98},
{"Z", 0x99},
{"[", 0x9A},
{"\\", 0x9B},
{"]", 0x9C},
{"^", 0x9D},
{"_", 0x9E},
{"`", 0x9F},
{"a", 0xA0},
{"b", 0xA1},
{"c", 0xA2},
{"d", 0xA3},
{"e", 0xA4},
{"f", 0xA5},
{"g", 0xA6},
{"h", 0xA7},
{"i", 0xA8},
{"j", 0xA9},
{"k", 0xAA},
{"l", 0xAB},
{"m", 0xAC},
{"n", 0xAD},
{"o", 0xAE},
{"p", 0xAF},
{"q", 0xB0},
{"r", 0xB1},
{"s", 0xB2},
{"t", 0xB3},
{"u", 0xB4},
{"v", 0xB5},
{"w", 0xB6},
{"x", 0xB7},
{"y", 0xB8},
{"z", 0xB9},
{"{", 0xE1}, /* Pk */
{"}", 0xE2}, /* Mn */
{"-", 0xE3},
{"?", 0xE6},
{"!", 0xE7},
{"♂", 0xEF},
{".", 0xF2},
{"/", 0xF3},
{",", 0xF4},
{"♀", 0xF5},
{"0", 0xF6},
{"1", 0xF7},
{"2", 0xF8},
{"3", 0xF9},
{"4", 0xFA},
{"5", 0xFB},
{"6", 0xFC},
{"7", 0xFD},
{"8", 0xFE},
{"9", 0xFF}
};
private static Dictionary<string, byte> U2RBY_J => new Dictionary<string, byte> {
{"ガ", 0x05},
{"ギ", 0x06},
{"グ", 0x07},
{"ゲ", 0x08},
{"ゴ", 0x09},
{"ザ", 0x0A},
{"ジ", 0x0B},
{"ズ", 0x0C},
{"ゼ", 0x0D},
{"ゾ", 0x0E},
{"ダ", 0x0F},
{"ヂ", 0x10},
{"ヅ", 0x11},
{"デ", 0x12},
{"ド", 0x13},
{"バ", 0x19},
{"ビ", 0x1A},
{"ブ", 0x1B},
{"ボ", 0x1C},
{"が", 0x26},
{"ぎ", 0x27},
{"ぐ", 0x28},
{"げ", 0x29},
{"ご", 0x2A},
{"ざ", 0x2B},
{"じ", 0x2C},
{"ず", 0x2D},
{"ぜ", 0x2E},
{"ぞ", 0x2F},
{"だ", 0x30},
{"ぢ", 0x31},
{"づ", 0x32},
{"で", 0x33},
{"ど", 0x34},
{"ば", 0x3A},
{"び", 0x3B},
{"ぶ", 0x3C},
{"ベ", 0x3D},
{"べ", 0x3D},
{"ぼ", 0x3E},
{"パ", 0x40},
{"ピ", 0x41},
{"プ", 0x42},
{"ポ", 0x43},
{"ぱ", 0x44},
{"ぴ", 0x45},
{"ぷ", 0x46},
{"ぺ", 0x47},
{"ペ", 0x47},
{"ぽ", 0x48},
{"\0", 0x50},
{"トレーナー", 0x5D},
{"ア", 0x80},
{"イ", 0x81},
{"ウ", 0x82},
{"ェ", 0x83},
{"エ", 0x83},
{"オ", 0x84},
{"ォ", 0x84},
{"カ", 0x85},
{"キ", 0x86},
{"ク", 0x87},
{"ケ", 0x88},
{"コ", 0x89},
{"サ", 0x8A},
{"シ", 0x8B},
{"ス", 0x8C},
{"セ", 0x8D},
{"ソ", 0x8E},
{"タ", 0x8F},
{"チ", 0x90},
{"ツ", 0x91},
{"テ", 0x92},
{"ト", 0x93},
{"ナ", 0x94},
{"ニ", 0x95},
{"ヌ", 0x96},
{"ネ", 0x97},
{"", 0x98},
{"ハ", 0x99},
{"ヒ", 0x9A},
{"フ", 0x9B},
{"ホ", 0x9C},
{"マ", 0x9D},
{"ミ", 0x9E},
{"ム", 0x9F},
{"メ", 0xA0},
{"モ", 0xA1},
{"ヤ", 0xA2},
{"ユ", 0xA3},
{"ヨ", 0xA4},
{"ラ", 0xA5},
{"ル", 0xA6},
{"レ", 0xA7},
{"ロ", 0xA8},
{"ワ", 0xA9},
{"ヲ", 0xAA},
{"ン", 0xAB},
{"ッ", 0xAC},
{"ャ", 0xAD},
{"ュ", 0xAE},
{"ョ", 0xAF},
{"ィ", 0xB0},
{"あ", 0xB1},
{"い", 0xB2},
{"う", 0xB3},
{"え", 0xB4},
{"お", 0xB5},
{"か", 0xB6},
{"き", 0xB7},
{"く", 0xB8},
{"け", 0xB9},
{"こ", 0xBA},
{"さ", 0xBB},
{"し", 0xBC},
{"す", 0xBD},
{"せ", 0xBE},
{"そ", 0xBF},
{"た", 0xC0},
{"ち", 0xC1},
{"つ", 0xC2},
{"て", 0xC3},
{"と", 0xC4},
{"な", 0xC5},
{"に", 0xC6},
{"ぬ", 0xC7},
{"ね", 0xC8},
{"の", 0xC9},
{"は", 0xCA},
{"ひ", 0xCB},
{"ふ", 0xCC},
{"へ", 0xCD},
{"ほ", 0xCE},
{"ま", 0xCF},
{"み", 0xD0},
{"む", 0xD1},
{"め", 0xD2},
{"も", 0xD3},
{"や", 0xD4},
{"ゆ", 0xD5},
{"よ", 0xD6},
{"ら", 0xD7},
{"リ", 0xD8},
{"り", 0xD8},
{"る", 0xD9},
{"れ", 0xDA},
{"ろ", 0xDB},
{"わ", 0xDC},
{"を", 0xDD},
{"ん", 0xDE},
{"っ", 0xDF},
{"ゃ", 0xE0},
{"ゅ", 0xE1},
{"ょ", 0xE2},
{"ー", 0xE3},
{"ァ", 0xE9},
{"♂", 0xEF},
{"♀", 0xF5}
};
private static Dictionary<byte, string> RBY2U_J => new Dictionary<byte, string> {
{0x05, "ガ"},
{0x06, "ギ"},
{0x07, "グ"},
{0x08, "ゲ"},
{0x09, "ゴ"},
{0x0A, "ザ"},
{0x0B, "ジ"},
{0x0C, "ズ"},
{0x0D, "ゼ"},
{0x0E, "ゾ"},
{0x0F, "ダ"},
{0x10, "ヂ"},
{0x11, "ヅ"},
{0x12, "デ"},
{0x13, "ド"},
{0x19, "バ"},
{0x1A, "ビ"},
{0x1B, "ブ"},
{0x1C, "ボ"},
{0x26, "が"},
{0x27, "ぎ"},
{0x28, "ぐ"},
{0x29, "げ"},
{0x2A, "ご"},
{0x2B, "ざ"},
{0x2C, "じ"},
{0x2D, "ず"},
{0x2E, "ぜ"},
{0x2F, "ぞ"},
{0x30, "だ"},
{0x31, "ぢ"},
{0x32, "づ"},
{0x33, "で"},
{0x34, "ど"},
{0x3A, "ば"},
{0x3B, "び"},
{0x3C, "ぶ"},
{0x3D, "ベ"},
{0x3E, "ぼ"},
{0x40, "パ"},
{0x41, "ピ"},
{0x42, "プ"},
{0x43, "ポ"},
{0x44, "ぱ"},
{0x45, "ぴ"},
{0x46, "ぷ"},
{0x47, "ペ"},
{0x48, "ぽ"},
{0x50, "\0"},
{0x5D, "トレーナー"},
{0x80, "ア"},
{0x81, "イ"},
{0x82, "ウ"},
{0x83, "ェ"},
{0x84, "オ"},
{0x85, "カ"},
{0x86, "キ"},
{0x87, "ク"},
{0x88, "ケ"},
{0x89, "コ"},
{0x8A, "サ"},
{0x8B, "シ"},
{0x8C, "ス"},
{0x8D, "セ"},
{0x8E, "ソ"},
{0x8F, "タ"},
{0x90, "チ"},
{0x91, "ツ"},
{0x92, "テ"},
{0x93, "ト"},
{0x94, "ナ"},
{0x95, "ニ"},
{0x96, "ヌ"},
{0x97, "ネ"},
{0x98, ""},
{0x99, "ハ"},
{0x9A, "ヒ"},
{0x9B, "フ"},
{0x9C, "ホ"},
{0x9D, "マ"},
{0x9E, "ミ"},
{0x9F, "ム"},
{0xA0, "メ"},
{0xA1, "モ"},
{0xA2, "ヤ"},
{0xA3, "ユ"},
{0xA4, "ヨ"},
{0xA5, "ラ"},
{0xA6, "ル"},
{0xA7, "レ"},
{0xA8, "ロ"},
{0xA9, "ワ"},
{0xAA, "ヲ"},
{0xAB, "ン"},
{0xAC, "ッ"},
{0xAD, "ャ"},
{0xAE, "ュ"},
{0xAF, "ョ"},
{0xB0, "ィ"},
{0xB1, "あ"},
{0xB2, "い"},
{0xB3, "う"},
{0xB4, "え"},
{0xB5, "お"},
{0xB6, "か"},
{0xB7, "き"},
{0xB8, "く"},
{0xB9, "け"},
{0xBA, "こ"},
{0xBB, "さ"},
{0xBC, "し"},
{0xBD, "す"},
{0xBE, "せ"},
{0xBF, "そ"},
{0xC0, "た"},
{0xC1, "ち"},
{0xC2, "つ"},
{0xC3, "て"},
{0xC4, "と"},
{0xC5, "な"},
{0xC6, "に"},
{0xC7, "ぬ"},
{0xC8, "ね"},
{0xC9, "の"},
{0xCA, "は"},
{0xCB, "ひ"},
{0xCC, "ふ"},
{0xCD, "へ"},
{0xCE, "ほ"},
{0xCF, "ま"},
{0xD0, "み"},
{0xD1, "む"},
{0xD2, "め"},
{0xD3, "も"},
{0xD4, "や"},
{0xD5, "ゆ"},
{0xD6, "よ"},
{0xD7, "ら"},
{0xD8, "リ"},
{0xD9, "る"},
{0xDA, "れ"},
{0xDB, "ろ"},
{0xDC, "わ"},
{0xDD, "を"},
{0xDE, "ん"},
{0xDF, "っ"},
{0xE0, "ゃ"},
{0xE1, "ゅ"},
{0xE2, "ょ"},
{0xE3, "ー"},
{0xE9, "ァ"},
{0xEF, "♂"},
{0xF5, "♀"}
};
#endregion
#region Gen 1 Item Table
public static string[] getG1ItemList()
{
return new[] { "(None)", "Master Ball", "Ultra Ball", "Great Ball", "Poké Ball", "Town Map", "Bicycle", "????? (7)", "Safari Ball", "Pokédex", "Moon Stone", "Antidote", "Burn Heal", "Ice Heal", "Awakening", "Parlyz Heal", "Full Restore", "Max Potion", "Hyper Potion", "Super Potion", "Potion", "BoulderBadge", "CascadeBadge", "ThunderBadge", "RainbowBadge", "SoulBadge", "MarshBadge", "VolcanoBadge", "EarthBadge", "Escape Rope", "Repel", "Old Amber", "Fire Stone", "Thunder Stone", "Water Stone", "HP Up", "Protein", "Iron", "Carbos", "Calcium", "Rare Candy", "Dome Fossil", "Helix Fossil", "Secret Key", "????? (44)", "Bike Voucher", "X Accuracy", "Leaf Stone", "Card Key", "Nugget", "PP Up (Unused)", "Poké Doll", "Full Heal", "Revive", "Max Revive", "Guard Spec.", "Super Repel", "Max Repel", "Dire Hit", "Coin", "Fresh Water", "Soda Pop", "Lemonade", "S.S. Ticket", "Gold Teeth", "X Attack", "X Defend", "X Speed", "X Special", "Coin Case", "Oak's Parcel", "Itemfinder", "Silph Scope", "Poké Flute", "Lift Key", "Exp. All", "Old Rod", "Good Rod", "Super Rod", "PP Up", "Ether", "Max Ether", "Elixer", "Max Elixer", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "HM01", "HM02", "HM03", "HM04", "HM05", "TM01", "TM02", "TM03", "TM04", "TM05", "TM06", "TM07", "TM08", "TM09", "TM10", "TM11", "TM12", "TM13", "TM14", "TM15", "TM16", "TM17", "TM18", "TM19", "TM20", "TM21", "TM22", "TM23", "TM24", "TM25", "TM26", "TM27", "TM28", "TM29", "TM30", "TM31", "TM32", "TM33", "TM34", "TM35", "TM36", "TM37", "TM38", "TM39", "TM40", "TM41", "TM42", "TM43", "TM44", "TM45", "TM46", "TM47", "TM48", "TM49", "TM50", "TM51", "TM52", "TM53", "TM54", "TM55" };
}
#endregion
public static int[] getG1LegalItems()
{
return Enumerable.Range(0, 7) // 0-6
.Concat(Enumerable.Range(10, 11)) // 10-20
.Concat(Enumerable.Range(29, 15)) // 29-43
.Concat(Enumerable.Range(45, 5)) // 45-49
.Concat(Enumerable.Range(51, 8)) // 51-58
.Concat(Enumerable.Range(60, 24)) // 60-83
.Concat(Enumerable.Range(196, 54)) // 196-249
.ToArray();
}
public static int getG1Species(int raw_id)
{
int[] table = { 0x00, 0x70, 0x73, 0x20, 0x23, 0x15, 0x64, 0x22, 0x50, 0x02, 0x67, 0x6C, 0x66, 0x58, 0x5E, 0x1D, 0x1F, 0x68, 0x6F, 0x83, 0x3B, 0x97, 0x82, 0x5A, 0x48, 0x5C, 0x7B, 0x78, 0x09, 0x7F, 0x72, 0x00, 0x00, 0x3A, 0x5F, 0x16, 0x10, 0x4F, 0x40, 0x4B, 0x71, 0x43, 0x7A, 0x6A, 0x6B, 0x18, 0x2F, 0x36, 0x60, 0x4C, 0x00, 0x7E, 0x00, 0x7D, 0x52, 0x6D, 0x00, 0x38, 0x56, 0x32, 0x80, 0x00, 0x00, 0x00, 0x53, 0x30, 0x95, 0x00, 0x00, 0x00, 0x54, 0x3C, 0x7C, 0x92, 0x90, 0x91, 0x84, 0x34, 0x62, 0x00, 0x00, 0x00, 0x25, 0x26, 0x19, 0x1A, 0x00, 0x00, 0x93, 0x94, 0x8C, 0x8D, 0x74, 0x75, 0x00, 0x00, 0x1B, 0x1C, 0x8A, 0x8B, 0x27, 0x28, 0x85, 0x88, 0x87, 0x86, 0x42, 0x29, 0x17, 0x2E, 0x3D, 0x3E, 0x0D, 0x0E, 0x0F, 0x00, 0x55, 0x39, 0x33, 0x31, 0x57, 0x00, 0x00, 0x0A, 0x0B, 0x0C, 0x44, 0x00, 0x37, 0x61, 0x2A, 0x96, 0x8F, 0x81, 0x00, 0x00, 0x59, 0x00, 0x63, 0x5B, 0x00, 0x65, 0x24, 0x6E, 0x35, 0x69, 0x00, 0x5D, 0x3F, 0x41, 0x11, 0x12, 0x79, 0x01, 0x03, 0x49, 0x00, 0x76, 0x77, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x4E, 0x13, 0x14, 0x21, 0x1E, 0x4A, 0x89, 0x8E, 0x00, 0x51, 0x00, 0x00, 0x04, 0x07, 0x05, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x2C, 0x2D, 0x45, 0x46, 0x47, 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, 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, 0x00 };
return table[raw_id];
}
public static int setG1Species(int dex_id)
{
int[] table = { 0x00, 0x99, 0x09, 0x9A, 0xB0, 0xB2, 0xB4, 0xB1, 0xB3, 0x1C, 0x7B, 0x7C, 0x7D, 0x70, 0x71, 0x72, 0x24, 0x96, 0x97, 0xA5, 0xA6, 0x05, 0x23, 0x6C, 0x2D, 0x54, 0x55, 0x60, 0x61, 0x0F, 0xA8, 0x10, 0x03, 0xA7, 0x07, 0x04, 0x8E, 0x52, 0x53, 0x64, 0x65, 0x6B, 0x82, 0xB9, 0xBA, 0xBB, 0x6D, 0x2E, 0x41, 0x77, 0x3B, 0x76, 0x4D, 0x90, 0x2F, 0x80, 0x39, 0x75, 0x21, 0x14, 0x47, 0x6E, 0x6F, 0x94, 0x26, 0x95, 0x6A, 0x29, 0x7E, 0xBC, 0xBD, 0xBE, 0x18, 0x9B, 0xA9, 0x27, 0x31, 0xA3, 0xA4, 0x25, 0x08, 0xAD, 0x36, 0x40, 0x46, 0x74, 0x3A, 0x78, 0x0D, 0x88, 0x17, 0x8B, 0x19, 0x93, 0x0E, 0x22, 0x30, 0x81, 0x4E, 0x8A, 0x06, 0x8D, 0x0C, 0x0A, 0x11, 0x91, 0x2B, 0x2C, 0x0B, 0x37, 0x8F, 0x12, 0x01, 0x28, 0x1E, 0x02, 0x5C, 0x5D, 0x9D, 0x9E, 0x1B, 0x98, 0x2A, 0x1A, 0x48, 0x35, 0x33, 0x1D, 0x3C, 0x85, 0x16, 0x13, 0x4C, 0x66, 0x69, 0x68, 0x67, 0xAA, 0x62, 0x63, 0x5A, 0x5B, 0xAB, 0x84, 0x4A, 0x4B, 0x49, 0x58, 0x59, 0x42, 0x83, 0x15, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return table[dex_id];
}
public static string getG1Str(byte[] strdata, bool jp)
{
Dictionary<byte, string> dict = jp ? RBY2U_J : RBY2U_U;
return strdata
.TakeWhile(b => dict.ContainsKey(b))
.Select(b => dict[b])
.TakeWhile(s => s != "\0")
.Aggregate("", (current, cur) => current + cur);
}
public static byte[] setG1Str(string str, bool jp)
{
Dictionary<string, byte> dict = jp ? U2RBY_J : U2RBY_U;
if (dict.ContainsKey(str)) // Handle "[TRAINER]"
return new[] {dict[str], dict["\0"]};
return str
.TakeWhile(c => dict.ContainsKey(c.ToString()))
.Select(c => dict[c.ToString()])
.Concat(new[] {dict["\0"]})
.ToArray();
}
}
}

View file

@ -10,6 +10,9 @@
public abstract int SPE { get; set; }
public abstract int SPA { get; set; }
public abstract int SPD { get; set; }
public int[] Stats => new[] { HP, ATK, DEF, SPE, SPA, SPD };
public abstract int EV_HP { get; set; }
public abstract int EV_ATK { get; set; }
public abstract int EV_DEF { get; set; }

View file

@ -0,0 +1,68 @@
using System.Linq;
namespace PKHeX
{
public class PersonalInfoG1 : PersonalInfo
{
protected PersonalInfoG1() { }
public const int SIZE = 0x1C;
public PersonalInfoG1(byte[] data)
{
if (data.Length != SIZE)
return;
Data = data;
TMHM = getBits(Data.Skip(0x14).Take(0x8).ToArray());
}
public override byte[] Write()
{
setBits(TMHM).CopyTo(Data, 0x14);
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 int SPC { get { return Data[0x05]; } set { Data[0x05] = (byte)value; } }
public override int SPA { get { return SPC; } set { SPC = value; } }
public override int SPD { get { return SPC; } set { SPC = value; } }
public override int[] Types
{
get { return new int[] { Data[0x06], Data[0x07] }; }
set
{
if (value?.Length != 2) return;
Data[0x06] = (byte)value[0];
Data[0x07] = (byte)value[1];
}
}
public override int CatchRate { get { return Data[0x08]; } set { Data[0x08] = (byte)value; } }
public override int BaseEXP { get { return Data[0x09]; } set { Data[0x09] = (byte)value; } }
public int Move1 { get { return Data[0x0A]; } set { Data[0x0A] = (byte)value; } }
public int Move2 { get { return Data[0x0B]; } set { Data[0x0B] = (byte)value; } }
public int Move3 { get { return Data[0x0C]; } set { Data[0x0C] = (byte)value; } }
public int Move4 { get { return Data[0x0D]; } set { Data[0x0D] = (byte)value; } }
public override int EXPGrowth { get { return Data[0x13]; } set { Data[0x13] = (byte)value; } }
// 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 int EV_SPC { get { return SPC; } set { } }
public override int EV_SPA { get { return EV_SPC; } set { } }
public override int EV_SPD { get { return EV_SPC; } set { } }
// Future game values, unused
public override int[] Items { get { return new[] { 0, 0 }; } set { } }
public override int[] EggGroups { get { return new[] { 0, 0 }; } set { } }
public override int[] Abilities { get { return new[] { 0, 0 }; } set { } }
public override int Gender { get { return 0; } set { } }
public override int HatchCycles { get { return 0; } set { } }
public override int BaseFriendship { get { return 0; } set { } }
public override int EscapeRate { get { return 0; } set { } }
public override int Color { get { return 0; } set { } }
}
}

View file

@ -15,6 +15,7 @@ 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 RBY = new PersonalTable(Properties.Resources.personal_rby, GameVersion.RBY);
private static byte[][] splitBytes(byte[] data, int size)
{
@ -31,6 +32,7 @@ namespace PKHeX
int size = 0;
switch (format)
{
case GameVersion.RBY: size = PersonalInfoG1.SIZE; break;
case GameVersion.RS:
case GameVersion.E:
case GameVersion.FR:
@ -52,6 +54,10 @@ namespace PKHeX
switch (format)
{
case GameVersion.RBY:
for (int i = 0; i < d.Length; i++)
d[i] = new PersonalInfoG1(entries[i]);
break;
case GameVersion.RS:
case GameVersion.E:
case GameVersion.FR:

View file

@ -15555,6 +15555,16 @@ namespace PKHeX.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] personal_rby {
get {
object obj = ResourceManager.GetObject("personal_rby", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
@ -15585,6 +15595,15 @@ namespace PKHeX.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to 20160830.
/// </summary>
internal static string ProgramVersion {
get {
return ResourceManager.GetString("ProgramVersion", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -16670,6 +16689,16 @@ namespace PKHeX.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap slotDrag {
get {
object obj = ResourceManager.GetObject("slotDrag", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -18429,6 +18458,16 @@ namespace PKHeX.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap swapBox {
get {
object obj = ResourceManager.GetObject("swapBox", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized string similar to -
///Duftnote

View file

@ -6385,4 +6385,16 @@
<data name="item_tm" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\item\item_tm.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="slotDrag" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\box\slotDrag.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="swapBox" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\box\swapBox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ProgramVersion" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\version.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="personal_rby" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\byte\personal_rby;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

View file

@ -764,7 +764,7 @@ http://projectpokemon.org/forums/showthread.php?36986
- Fixed: Trainer Editor window ~ Unicode character display. Thanks \!
- Fixed: Minor main window editing bugs for EXP/Nature/Gender.
08/07/16 - New Update:
08/07/16 - New Update: (38200)
- Added: TWLSaveTool folder auto-detection for past generation save files.
- Changed: Save file auto-detection now detects the last saved file instead of a predefined order. Saving a NDS game after 3DS game will return the NDS save.
- Fixed: Multiple gen3/4 save/pkm/transfer bugs. Thanks BeyondTheHorizon, JHorbach, Destinyy, MichiS97, ashrobb, IamAVeryNicePereson & javier_himura!
@ -775,3 +775,17 @@ http://projectpokemon.org/forums/showthread.php?36986
- Fixed: Gen6 Trainer Info editor can now edit Vivillon forms again. Thanks Majickhat55!
- Added: Cleaner 'delete' command to batch editor (set species to 0 to clear data).
- Added: Specifying output folder when modifying a folder in the Batch Editor. Thanks \!
08/22/16 - New Update:
- Changed: Drag&Drop now replaces the cursor with the sprite to better simulate moving a Pokémon.
- Added: FBI homebrew save file detection. Thanks poutros!
- Fixed: Program now indicates the type of blank save file loaded if none is detected on startup.
- Fixed: Vivillon form Showdown Import behavior. Thansk sora10pls!
- Fixed: Vivillon form selection in Trainer Editor re-enabled. Thanks Tsunamical!
- Fixed: Program should now load data much quicker; includes save files, box slots, and pcdata.
- Fixed: Past gen transfer / save file bugs. Thanks vacero, JSS, Ninjistix & Porta_14
- Fixed: Mystery Gift manipulation now behaves better. Thanks jonaththejonath, sora10pls, Odaxis & rush2802!
- Fixed: Legality indication persists when loading a save file.
- Fixed: Hyperspace Fury legality. Thanks RanEncounter!
- Changed: Batch Editor improvements for PID/EC writing. Thanks JSS & Pokegeo!
- Changed: Updated Spanish and Chinese translation. Thanks ajtudela & easyworld!

View file

@ -289,37 +289,38 @@ B_None = Remove All
B_Cancel = Cancel
B_Save = Save
------------------Super Training-----------------------
L_SuperTrain1_HP = Rang 1: KP
L_SuperTrain1_ATK = Rang 1: Atk
L_SuperTrain1_DEF = Rang 1: Def
L_SuperTrain1_SPA = Rang 1: SpA
L_SuperTrain1_SPD = Rang 1: SpD
L_SuperTrain1_SPE = Rang 1: Init
L_SuperTrain2_HP = Rang 2: KP
L_SuperTrain2_ATK = Rang 2: Atk
L_SuperTrain2_DEF = Rang 2: Def
L_SuperTrain2_SPA = Rang 2: SpA
L_SuperTrain2_SPD = Rang 2: SpD
L_SuperTrain2_SPE = Rang 2: Init
L_SuperTrain3_HP = Rang 3: HP
L_SuperTrain3_ATK = Rang 3: Atk
L_SuperTrain3_DEF = Rang 3: Def
L_SuperTrain3_SPA = Rang 3: SpA
L_SuperTrain3_SPD = Rang 3: SpD
L_SuperTrain3_SPE = Rang 3: Init
CHK_Secret = Geheimtraining verfügbar
L_SuperTrain4_1 = Rang 4: Unheil
L_SuperTrain5_1 = Rang 5: Blattst.
L_SuperTrain5_2 = Rang 5: Feuerst.
L_SuperTrain5_3 = Rang 5: Wasserst.
L_SuperTrain5_4 = Rang 5: Beweg. Tore!
L_SuperTrain6_1 = Rang 6: 2. Halbzeit!
L_SuperTrain6_2 = Rang 6: 1. Haltzeit!
L_SuperTrain6_3 = Rang 6: Weitsch.
L_SuperTrain7_1 = Rang 7: Purmel
L_SuperTrain7_2 = Rang 7: Bit-Ballon-Barriere
L_SuperTrain7_3 = Rang 7: Blitz-K.O.!
L_SuperTrain8_1 = Rang 8: Pokémon X/Y
CHK_SuperTrain1_HP = Rang 1: KP
CHK_SuperTrain1_ATK = Rang 1: Atk
CHK_SuperTrain1_DEF = Rang 1: Def
CHK_SuperTrain1_SPA = Rang 1: SpA
CHK_SuperTrain1_SPD = Rang 1: SpD
CHK_SuperTrain1_SPE = Rang 1: Init
CHK_SuperTrain2_HP = Rang 2: KP
CHK_SuperTrain2_ATK = Rang 2: Atk
CHK_SuperTrain2_DEF = Rang 2: Def
CHK_SuperTrain2_SPA = Rang 2: SpA
CHK_SuperTrain2_SPD = Rang 2: SpD
CHK_SuperTrain2_SPE = Rang 2: Init
CHK_SuperTrain3_HP = Rang 3: HP
CHK_SuperTrain3_ATK = Rang 3: Atk
CHK_SuperTrain3_DEF = Rang 3: Def
CHK_SuperTrain3_SPA = Rang 3: SpA
CHK_SuperTrain3_SPD = Rang 3: SpD
CHK_SuperTrain3_SPE = Rang 3: Init
CHK_SecretUnlocked = Geheimtraining Verfügbar
CHK_SecretComplete = Geheimtraining Komplett
CHK_SuperTrain4_1 = Rang 4: Unheil
CHK_SuperTrain5_1 = Rang 5: Blattst.
CHK_SuperTrain5_2 = Rang 5: Feuerst.
CHK_SuperTrain5_3 = Rang 5: Wasserst.
CHK_SuperTrain5_4 = Rang 5: Beweg. Tore!
CHK_SuperTrain6_1 = Rang 6: 2. Halbzeit!
CHK_SuperTrain6_2 = Rang 6: 1. Haltzeit!
CHK_SuperTrain6_3 = Rang 6: Weitsch.
CHK_SuperTrain7_1 = Rang 7: Purmel
CHK_SuperTrain7_2 = Rang 7: Bit-Ballon-Barriere
CHK_SuperTrain7_3 = Rang 7: Blitz-K.O.!
CHK_SuperTrain8_1 = Rang 8: Pokémon X/Y
---
L_Bag = Last Used Bag:
L_Hits = Hits Remaining:

View file

@ -291,37 +291,38 @@ B_None = Remove All
B_Cancel = Cancel
B_Save = Save
------------------Super Training-----------------------
L_SuperTrain1_HP = Rank 1: HP
L_SuperTrain1_ATK = Rank 1: Atk
L_SuperTrain1_DEF = Rank 1: Def
L_SuperTrain1_SPA = Rank 1: SpA
L_SuperTrain1_SPD = Rank 1: SpD
L_SuperTrain1_SPE = Rank 1: Spe
L_SuperTrain2_HP = Rank 2: HP
L_SuperTrain2_ATK = Rank 2: Atk
L_SuperTrain2_DEF = Rank 2: Def
L_SuperTrain2_SPA = Rank 2: SpA
L_SuperTrain2_SPD = Rank 2: SpD
L_SuperTrain2_SPE = Rank 2: Spe
L_SuperTrain3_HP = Rank 3: HP
L_SuperTrain3_ATK = Rank 3: Atk
L_SuperTrain3_DEF = Rank 3: Def
L_SuperTrain3_SPA = Rank 3: SpA
L_SuperTrain3_SPD = Rank 3: SpD
L_SuperTrain3_SPE = Rank 3: Spe
CHK_Secret = Secret Training Enabled
L_SuperTrain4_1 = Rank 4: Troubles
L_SuperTrain5_1 = Rank 5: Leaf
L_SuperTrain5_2 = Rank 5: Fire
L_SuperTrain5_3 = Rank 5: Water
L_SuperTrain5_4 = Rank 5: Fleeing
L_SuperTrain6_1 = Rank 6: Second
L_SuperTrain6_2 = Rank 6: Quick
L_SuperTrain6_3 = Rank 6: Long
L_SuperTrain7_1 = Rank 7: Scatter
L_SuperTrain7_2 = Rank 7: Barrage
L_SuperTrain7_3 = Rank 7: Hydreigon
L_SuperTrain8_1 = Rank 8: Best
CHK_SuperTrain1_HP = Rank 1: HP
CHK_SuperTrain1_ATK = Rank 1: Atk
CHK_SuperTrain1_DEF = Rank 1: Def
CHK_SuperTrain1_SPA = Rank 1: SpA
CHK_SuperTrain1_SPD = Rank 1: SpD
CHK_SuperTrain1_SPE = Rank 1: Spe
CHK_SuperTrain2_HP = Rank 2: HP
CHK_SuperTrain2_ATK = Rank 2: Atk
CHK_SuperTrain2_DEF = Rank 2: Def
CHK_SuperTrain2_SPA = Rank 2: SpA
CHK_SuperTrain2_SPD = Rank 2: SpD
CHK_SuperTrain2_SPE = Rank 2: Spe
CHK_SuperTrain3_HP = Rank 3: HP
CHK_SuperTrain3_ATK = Rank 3: Atk
CHK_SuperTrain3_DEF = Rank 3: Def
CHK_SuperTrain3_SPA = Rank 3: SpA
CHK_SuperTrain3_SPD = Rank 3: SpD
CHK_SuperTrain3_SPE = Rank 3: Spe
CHK_SecretUnlocked = Secret Training Unlocked
CHK_SecretComplete = Secret Training Complete
CHK_SuperTrain4_1 = Rank 4: Troubles
CHK_SuperTrain5_1 = Rank 5: Leaf
CHK_SuperTrain5_2 = Rank 5: Fire
CHK_SuperTrain5_3 = Rank 5: Water
CHK_SuperTrain5_4 = Rank 5: Fleeing
CHK_SuperTrain6_1 = Rank 6: Second
CHK_SuperTrain6_2 = Rank 6: Quick
CHK_SuperTrain6_3 = Rank 6: Long
CHK_SuperTrain7_1 = Rank 7: Scatter
CHK_SuperTrain7_2 = Rank 7: Barrage
CHK_SuperTrain7_3 = Rank 7: Hydreigon
CHK_SuperTrain8_1 = Rank 8: Best
---
L_Bag = Last Used Bag:
L_Hits = Hits Remaining:

View file

@ -291,38 +291,39 @@ B_None = Quitar todos
B_Cancel = Cancelar
B_Save = Guardar
------------------Super Training-----------------------
L_SuperTraining = Superentrenamiento Normal
L_SuperTrain1_HP = Nv. 1: PS
L_SuperTrain1_ATK = Nv. 1: Atq
L_SuperTrain1_DEF = Nv. 1: Def
L_SuperTrain1_SPA = Nv. 1: AtE
L_SuperTrain1_SPD = Nv. 1: DfE
L_SuperTrain1_SPE = Nv. 1: Vel
L_SuperTrain2_HP = Nv. 2: PS
L_SuperTrain2_ATK = Nv. 2: Atq
L_SuperTrain2_DEF = Nv. 2: Def
L_SuperTrain2_SPA = Nv. 2: AtE
L_SuperTrain2_SPD = Nv. 2: DfE
L_SuperTrain2_SPE = Nv. 2: Vel
L_SuperTrain3_HP = Nv. 3: PS
L_SuperTrain3_ATK = Nv. 3: Atq
L_SuperTrain3_DEF = Nv. 3: Def
L_SuperTrain3_SPA = Nv. 3: AtE
L_SuperTrain3_SPD = Nv. 3: DfE
L_SuperTrain3_SPE = Nv. 3: Vel
CHK_Secret = Superentrenamiento
L_SuperTrain4_1 = Nv. 4: Dificultad tras otra
L_SuperTrain5_1 = Nv. 5: Hoja
L_SuperTrain5_2 = Nv. 5: Fuego
L_SuperTrain5_3 = Nv. 5: Agua
L_SuperTrain5_4 = Nv. 5: Evasivas
L_SuperTrain6_1 = Nv. 6: Contraataque
L_SuperTrain6_2 = Nv. 6: Agilidad
L_SuperTrain6_3 = Nv. 6: Ristras
L_SuperTrain7_1 = Nv. 7: Scatterbug
L_SuperTrain7_2 = Nv. 7: Bombardeo
L_SuperTrain7_3 = Nv. 7: Hydreigon
L_SuperTrain8_1 = Nv. 8: X/Y
CHK_SuperTraining = Superentrenamiento Normal
CHK_SuperTrain1_HP = Nv. 1: PS
CHK_SuperTrain1_ATK = Nv. 1: Atq
CHK_SuperTrain1_DEF = Nv. 1: Def
CHK_SuperTrain1_SPA = Nv. 1: AtE
CHK_SuperTrain1_SPD = Nv. 1: DfE
CHK_SuperTrain1_SPE = Nv. 1: Vel
CHK_SuperTrain2_HP = Nv. 2: PS
CHK_SuperTrain2_ATK = Nv. 2: Atq
CHK_SuperTrain2_DEF = Nv. 2: Def
CHK_SuperTrain2_SPA = Nv. 2: AtE
CHK_SuperTrain2_SPD = Nv. 2: DfE
CHK_SuperTrain2_SPE = Nv. 2: Vel
CHK_SuperTrain3_HP = Nv. 3: PS
CHK_SuperTrain3_ATK = Nv. 3: Atq
CHK_SuperTrain3_DEF = Nv. 3: Def
CHK_SuperTrain3_SPA = Nv. 3: AtE
CHK_SuperTrain3_SPD = Nv. 3: DfE
CHK_SuperTrain3_SPE = Nv. 3: Vel
CHK_SecretUnlocked = Superentrenamiento Desbloqueado
CHK_SecretComplete = Superentrenamiento Completa
CHK_SuperTrain4_1 = Nv. 4: Dificultad tras otra
CHK_SuperTrain5_1 = Nv. 5: Hoja
CHK_SuperTrain5_2 = Nv. 5: Fuego
CHK_SuperTrain5_3 = Nv. 5: Agua
CHK_SuperTrain5_4 = Nv. 5: Evasivas
CHK_SuperTrain6_1 = Nv. 6: Contraataque
CHK_SuperTrain6_2 = Nv. 6: Agilidad
CHK_SuperTrain6_3 = Nv. 6: Ristras
CHK_SuperTrain7_1 = Nv. 7: Scatterbug
CHK_SuperTrain7_2 = Nv. 7: Bombardeo
CHK_SuperTrain7_3 = Nv. 7: Hydreigon
CHK_SuperTrain8_1 = Nv. 8: X/Y
---
L_Bag = Último saco usado:
L_Hits = Golpes restantes:

View file

@ -290,37 +290,38 @@ B_None = Remove All
B_Cancel = Cancel
B_Save = Save
------------------Super Training-----------------------
L_SuperTrain1_HP = Rang 1: PV
L_SuperTrain1_ATK = Rang 1: Attq.
L_SuperTrain1_DEF = Rang 1: Déf.
L_SuperTrain1_SPA = Rang 1: A. Spé.
L_SuperTrain1_SPD = Rang 1: D. Spé.
L_SuperTrain1_SPE = Rang 1: Vit.
L_SuperTrain2_HP = Rang 2: PV
L_SuperTrain2_ATK = Rang 2: Attq.
L_SuperTrain2_DEF = Rang 2: Déf.
L_SuperTrain2_SPA = Rang 2: A. Spé.
L_SuperTrain2_SPD = Rang 2: D. Spé.
L_SuperTrain2_SPE = Rang 2: Vit.
L_SuperTrain3_HP = Rang 3: PV
L_SuperTrain3_ATK = Rang 3: Attq.
L_SuperTrain3_DEF = Rang 3: Déf.
L_SuperTrain3_SPA = Rang 3: A. Spé.
L_SuperTrain3_SPD = Rang 3: D. Spé.
L_SuperTrain3_SPE = Rang 3: Vit.
CHK_Secret = Entraînement Secret Activé
L_SuperTrain4_1 = Rang 4: Troubles
L_SuperTrain5_1 = Rang 5: Plante
L_SuperTrain5_2 = Rang 5: Feu
L_SuperTrain5_3 = Rang 5: Eau
L_SuperTrain5_4 = Rang 5: Cibles Fuyantes
L_SuperTrain6_1 = Rang 6: Riposte
L_SuperTrain6_2 = Rang 6: Rapide
L_SuperTrain6_3 = Rang 6: Longue
L_SuperTrain7_1 = Rang 7: Lépidonille
L_SuperTrain7_2 = Rang 7: Ballon Pixel
L_SuperTrain7_3 = Rang 7: Trioxhydre
L_SuperTrain8_1 = Rang 8: X / Y
CHK_SuperTrain1_HP = Rang 1: PV
CHK_SuperTrain1_ATK = Rang 1: Attq.
CHK_SuperTrain1_DEF = Rang 1: Déf.
CHK_SuperTrain1_SPA = Rang 1: A. Spé.
CHK_SuperTrain1_SPD = Rang 1: D. Spé.
CHK_SuperTrain1_SPE = Rang 1: Vit.
CHK_SuperTrain2_HP = Rang 2: PV
CHK_SuperTrain2_ATK = Rang 2: Attq.
CHK_SuperTrain2_DEF = Rang 2: Déf.
CHK_SuperTrain2_SPA = Rang 2: A. Spé.
CHK_SuperTrain2_SPD = Rang 2: D. Spé.
CHK_SuperTrain2_SPE = Rang 2: Vit.
CHK_SuperTrain3_HP = Rang 3: PV
CHK_SuperTrain3_ATK = Rang 3: Attq.
CHK_SuperTrain3_DEF = Rang 3: Déf.
CHK_SuperTrain3_SPA = Rang 3: A. Spé.
CHK_SuperTrain3_SPD = Rang 3: D. Spé.
CHK_SuperTrain3_SPE = Rang 3: Vit.
CHK_SecretUnlocked = Entraînement Secret Activé
CHK_SecretComplete = Entraînement Secret Formazione
CHK_SuperTrain4_1 = Rang 4: Troubles
CHK_SuperTrain5_1 = Rang 5: Plante
CHK_SuperTrain5_2 = Rang 5: Feu
CHK_SuperTrain5_3 = Rang 5: Eau
CHK_SuperTrain5_4 = Rang 5: Cibles Fuyantes
CHK_SuperTrain6_1 = Rang 6: Riposte
CHK_SuperTrain6_2 = Rang 6: Rapide
CHK_SuperTrain6_3 = Rang 6: Longue
CHK_SuperTrain7_1 = Rang 7: Lépidonille
CHK_SuperTrain7_2 = Rang 7: Ballon Pixel
CHK_SuperTrain7_3 = Rang 7: Trioxhydre
CHK_SuperTrain8_1 = Rang 8: X / Y
---
L_Bag = Last Used Bag:
L_Hits = Hits Remaining:

View file

@ -291,37 +291,38 @@ B_None = Remove All
B_Cancel = Cancel
B_Save = Save
------------------Super Training-----------------------
L_SuperTrain1_HP = Rank 1: HP
L_SuperTrain1_ATK = Rank 1: Atk
L_SuperTrain1_DEF = Rank 1: Def
L_SuperTrain1_SPA = Rank 1: SpA
L_SuperTrain1_SPD = Rank 1: SpD
L_SuperTrain1_SPE = Rank 1: Spe
L_SuperTrain2_HP = Rank 2: HP
L_SuperTrain2_ATK = Rank 2: Atk
L_SuperTrain2_DEF = Rank 2: Def
L_SuperTrain2_SPA = Rank 2: SpA
L_SuperTrain2_SPD = Rank 2: SpD
L_SuperTrain2_SPE = Rank 2: Spe
L_SuperTrain3_HP = Rank 3: HP
L_SuperTrain3_ATK = Rank 3: Atk
L_SuperTrain3_DEF = Rank 3: Def
L_SuperTrain3_SPA = Rank 3: SpA
L_SuperTrain3_SPD = Rank 3: SpD
L_SuperTrain3_SPE = Rank 3: Spe
CHK_Secret = Secret Training Enabled
L_SuperTrain4_1 = Rank 4: Troubles
L_SuperTrain5_1 = Rank 5: Leaf
L_SuperTrain5_2 = Rank 5: Fire
L_SuperTrain5_3 = Rank 5: Water
L_SuperTrain5_4 = Rank 5: Fleeing
L_SuperTrain6_1 = Rank 6: Second
L_SuperTrain6_2 = Rank 6: Quick
L_SuperTrain6_3 = Rank 6: Long
L_SuperTrain7_1 = Rank 7: Scatter
L_SuperTrain7_2 = Rank 7: Barrage
L_SuperTrain7_3 = Rank 7: Hydreigon
L_SuperTrain8_1 = Rank 8: Best
CHK_SuperTrain1_HP = Rank 1: HP
CHK_SuperTrain1_ATK = Rank 1: Atk
CHK_SuperTrain1_DEF = Rank 1: Def
CHK_SuperTrain1_SPA = Rank 1: SpA
CHK_SuperTrain1_SPD = Rank 1: SpD
CHK_SuperTrain1_SPE = Rank 1: Spe
CHK_SuperTrain2_HP = Rank 2: HP
CHK_SuperTrain2_ATK = Rank 2: Atk
CHK_SuperTrain2_DEF = Rank 2: Def
CHK_SuperTrain2_SPA = Rank 2: SpA
CHK_SuperTrain2_SPD = Rank 2: SpD
CHK_SuperTrain2_SPE = Rank 2: Spe
CHK_SuperTrain3_HP = Rank 3: HP
CHK_SuperTrain3_ATK = Rank 3: Atk
CHK_SuperTrain3_DEF = Rank 3: Def
CHK_SuperTrain3_SPA = Rank 3: SpA
CHK_SuperTrain3_SPD = Rank 3: SpD
CHK_SuperTrain3_SPE = Rank 3: Spe
CHK_SecretUnlocked = Secret Training Unlocked
CHK_SecretComplete = Secret Training Complete
CHK_SuperTrain4_1 = Rank 4: Troubles
CHK_SuperTrain5_1 = Rank 5: Leaf
CHK_SuperTrain5_2 = Rank 5: Fire
CHK_SuperTrain5_3 = Rank 5: Water
CHK_SuperTrain5_4 = Rank 5: Fleeing
CHK_SuperTrain6_1 = Rank 6: Second
CHK_SuperTrain6_2 = Rank 6: Quick
CHK_SuperTrain6_3 = Rank 6: Long
CHK_SuperTrain7_1 = Rank 7: Scatter
CHK_SuperTrain7_2 = Rank 7: Barrage
CHK_SuperTrain7_3 = Rank 7: Hydreigon
CHK_SuperTrain8_1 = Rank 8: Best
---
L_Bag = Last Used Bag:
L_Hits = Hits Remaining:

View file

@ -290,37 +290,38 @@ B_None = Remove All
B_Cancel = Cancel
B_Save = Save
------------------Super Training-----------------------
L_SuperTrain1_HP = ランク1: HP
L_SuperTrain1_ATK = ランク1: 攻撃
L_SuperTrain1_DEF = ランク1: 防御
L_SuperTrain1_SPA = ランク1: 特攻
L_SuperTrain1_SPD = ランク1: 特防
L_SuperTrain1_SPE = ランク1: 素早さ
L_SuperTrain2_HP = ランク2: HP
L_SuperTrain2_ATK = ランク2: 攻撃
L_SuperTrain2_DEF = ランク2: 防御
L_SuperTrain2_SPA = ランク2: 特攻
L_SuperTrain2_SPD = ランク2: 特防
L_SuperTrain2_SPE = ランク2: 素早さ
L_SuperTrain3_HP = ランク3: HP
L_SuperTrain3_ATK = ランク3: 攻撃
L_SuperTrain3_DEF = ランク3: 防御
L_SuperTrain3_SPA = ランク3: 特攻
L_SuperTrain3_SPD = ランク3: 特防
L_SuperTrain3_SPE = ランク3: 素早さ
CHK_Secret = 秘密の訓練
L_SuperTrain4_1 = ランク4: Troubles
L_SuperTrain5_1 = ランク5: Leaf
L_SuperTrain5_2 = ランク5: Fire
L_SuperTrain5_3 = ランク5: Water
L_SuperTrain5_4 = ランク5: Fleeing
L_SuperTrain6_1 = ランク6: Second
L_SuperTrain6_2 = ランク6: Quick
L_SuperTrain6_3 = ランク6: Long
L_SuperTrain7_1 = ランク7: Scatter
L_SuperTrain7_2 = ランク7: Barrage
L_SuperTrain7_3 = ランク7: Hydreigon
L_SuperTrain8_1 = ランク8: X/Y
CHK_SuperTrain1_HP = ランク1: HP
CHK_SuperTrain1_ATK = ランク1: 攻撃
CHK_SuperTrain1_DEF = ランク1: 防御
CHK_SuperTrain1_SPA = ランク1: 特攻
CHK_SuperTrain1_SPD = ランク1: 特防
CHK_SuperTrain1_SPE = ランク1: 素早さ
CHK_SuperTrain2_HP = ランク2: HP
CHK_SuperTrain2_ATK = ランク2: 攻撃
CHK_SuperTrain2_DEF = ランク2: 防御
CHK_SuperTrain2_SPA = ランク2: 特攻
CHK_SuperTrain2_SPD = ランク2: 特防
CHK_SuperTrain2_SPE = ランク2: 素早さ
CHK_SuperTrain3_HP = ランク3: HP
CHK_SuperTrain3_ATK = ランク3: 攻撃
CHK_SuperTrain3_DEF = ランク3: 防御
CHK_SuperTrain3_SPA = ランク3: 特攻
CHK_SuperTrain3_SPD = ランク3: 特防
CHK_SuperTrain3_SPE = ランク3: 素早さ
CHK_SecretUnlocked = 秘密の訓練ロック解除
CHK_SecretComplete = 秘密の訓練を完了
CHK_SuperTrain4_1 = ランク4: Troubles
CHK_SuperTrain5_1 = ランク5: Leaf
CHK_SuperTrain5_2 = ランク5: Fire
CHK_SuperTrain5_3 = ランク5: Water
CHK_SuperTrain5_4 = ランク5: Fleeing
CHK_SuperTrain6_1 = ランク6: Second
CHK_SuperTrain6_2 = ランク6: Quick
CHK_SuperTrain6_3 = ランク6: Long
CHK_SuperTrain7_1 = ランク7: Scatter
CHK_SuperTrain7_2 = ランク7: Barrage
CHK_SuperTrain7_3 = ランク7: Hydreigon
CHK_SuperTrain8_1 = ランク8: X/Y
---
L_Bag = Last Used Bag:
L_Hits = Hits Remaining:

View file

@ -291,37 +291,38 @@ B_None = Remove All
B_Cancel = Cancel
B_Save = Save
------------------Super Training-----------------------
L_SuperTrain1_HP = 랭크 1: HP(체력)
L_SuperTrain1_ATK = 랭크 1: Atk(공격)
L_SuperTrain1_DEF = 랭크 1: Def(방어)
L_SuperTrain1_SPA = 랭크 1: SpA(특공)
L_SuperTrain1_SPD = 랭크 1: SpD(특방)
L_SuperTrain1_SPE = 랭크 1: Spe(스피드)
L_SuperTrain2_HP = 랭크 2: HP(체력)
L_SuperTrain2_ATK = 랭크 2: Atk(공격)
L_SuperTrain2_DEF = 랭크 2: Def(방어)
L_SuperTrain2_SPA = 랭크 2: SpA(특공)
L_SuperTrain2_SPD = 랭크 2: SpD(특방)
L_SuperTrain2_SPE = 랭크 2: Spe(스피드)
L_SuperTrain3_HP = 랭크 3: HP(체력)
L_SuperTrain3_ATK = 랭크 3: Atk(공격)
L_SuperTrain3_DEF = 랭크 3: Def(방어)
L_SuperTrain3_SPA = 랭크 3: SpA(특공)
L_SuperTrain3_SPD = 랭크 3: SpD(특방)
L_SuperTrain3_SPE = 랭크 3: Spe(스피드)
CHK_Secret = 비밀 트레이닝 활성화
L_SuperTrain4_1 = 랭크 4: Troubles
L_SuperTrain5_1 = 랭크 5: 풀
L_SuperTrain5_2 = 랭크 5: 불
L_SuperTrain5_3 = 랭크 5: 물
L_SuperTrain5_4 = 랭크 5: Fleeing
L_SuperTrain6_1 = 랭크 6: Second
L_SuperTrain6_2 = 랭크 6: Quick
L_SuperTrain6_3 = 랭크 6: Long
L_SuperTrain7_1 = 랭크 7: Scatter
L_SuperTrain7_2 = 랭크 7: Barrage
L_SuperTrain7_3 = 랭크 7: Hydreigon
L_SuperTrain8_1 = 랭크 8: 베스트
CHK_SuperTrain1_HP = 랭크 1: HP(체력)
CHK_SuperTrain1_ATK = 랭크 1: Atk(공격)
CHK_SuperTrain1_DEF = 랭크 1: Def(방어)
CHK_SuperTrain1_SPA = 랭크 1: SpA(특공)
CHK_SuperTrain1_SPD = 랭크 1: SpD(특방)
CHK_SuperTrain1_SPE = 랭크 1: Spe(스피드)
CHK_SuperTrain2_HP = 랭크 2: HP(체력)
CHK_SuperTrain2_ATK = 랭크 2: Atk(공격)
CHK_SuperTrain2_DEF = 랭크 2: Def(방어)
CHK_SuperTrain2_SPA = 랭크 2: SpA(특공)
CHK_SuperTrain2_SPD = 랭크 2: SpD(특방)
CHK_SuperTrain2_SPE = 랭크 2: Spe(스피드)
CHK_SuperTrain3_HP = 랭크 3: HP(체력)
CHK_SuperTrain3_ATK = 랭크 3: Atk(공격)
CHK_SuperTrain3_DEF = 랭크 3: Def(방어)
CHK_SuperTrain3_SPA = 랭크 3: SpA(특공)
CHK_SuperTrain3_SPD = 랭크 3: SpD(특방)
CHK_SuperTrain3_SPE = 랭크 3: Spe(스피드)
CHK_SecretUnlocked = 비밀 트레이닝 활성화
CHK_SecretComplete = 비밀 트레이닝 완료
CHK_SuperTrain4_1 = 랭크 4: Troubles
CHK_SuperTrain5_1 = 랭크 5: 풀
CHK_SuperTrain5_2 = 랭크 5: 불
CHK_SuperTrain5_3 = 랭크 5: 물
CHK_SuperTrain5_4 = 랭크 5: Fleeing
CHK_SuperTrain6_1 = 랭크 6: Second
CHK_SuperTrain6_2 = 랭크 6: Quick
CHK_SuperTrain6_3 = 랭크 6: Long
CHK_SuperTrain7_1 = 랭크 7: Scatter
CHK_SuperTrain7_2 = 랭크 7: Barrage
CHK_SuperTrain7_3 = 랭크 7: Hydreigon
CHK_SuperTrain8_1 = 랭크 8: 베스트
---
L_Bag = Last Used Bag:
L_Hits = Hits Remaining:

View file

@ -291,37 +291,38 @@ B_None = Remove All
B_Cancel = Cancel
B_Save = Save
------------------Super Training-----------------------
L_SuperTrain1_HP = Rank 1: HP
L_SuperTrain1_ATK = Rank 1: Atk
L_SuperTrain1_DEF = Rank 1: Def
L_SuperTrain1_SPA = Rank 1: SpA
L_SuperTrain1_SPD = Rank 1: SpD
L_SuperTrain1_SPE = Rank 1: Spe
L_SuperTrain2_HP = Rank 2: HP
L_SuperTrain2_ATK = Rank 2: Atk
L_SuperTrain2_DEF = Rank 2: Def
L_SuperTrain2_SPA = Rank 2: SpA
L_SuperTrain2_SPD = Rank 2: SpD
L_SuperTrain2_SPE = Rank 2: Spe
L_SuperTrain3_HP = Rank 3: HP
L_SuperTrain3_ATK = Rank 3: Atk
L_SuperTrain3_DEF = Rank 3: Def
L_SuperTrain3_SPA = Rank 3: SpA
L_SuperTrain3_SPD = Rank 3: SpD
L_SuperTrain3_SPE = Rank 3: Spe
CHK_Secret = Super Treino Activado
L_SuperTrain4_1 = Rank 4: Problemas
L_SuperTrain5_1 = Rank 5: Erva
L_SuperTrain5_2 = Rank 5: Fogo
L_SuperTrain5_3 = Rank 5: Água
L_SuperTrain5_4 = Rank 5: Fugir
L_SuperTrain6_1 = Rank 6: Segundo
L_SuperTrain6_2 = Rank 6: Rápido
L_SuperTrain6_3 = Rank 6: Longo
L_SuperTrain7_1 = Rank 7: Dispersar
L_SuperTrain7_2 = Rank 7: Barragem
L_SuperTrain7_3 = Rank 7: Hydreigon
L_SuperTrain8_1 = Rank 8: Melhor
CHK_SuperTrain1_HP = Rank 1: HP
CHK_SuperTrain1_ATK = Rank 1: Atk
CHK_SuperTrain1_DEF = Rank 1: Def
CHK_SuperTrain1_SPA = Rank 1: SpA
CHK_SuperTrain1_SPD = Rank 1: SpD
CHK_SuperTrain1_SPE = Rank 1: Spe
CHK_SuperTrain2_HP = Rank 2: HP
CHK_SuperTrain2_ATK = Rank 2: Atk
CHK_SuperTrain2_DEF = Rank 2: Def
CHK_SuperTrain2_SPA = Rank 2: SpA
CHK_SuperTrain2_SPD = Rank 2: SpD
CHK_SuperTrain2_SPE = Rank 2: Spe
CHK_SuperTrain3_HP = Rank 3: HP
CHK_SuperTrain3_ATK = Rank 3: Atk
CHK_SuperTrain3_DEF = Rank 3: Def
CHK_SuperTrain3_SPA = Rank 3: SpA
CHK_SuperTrain3_SPD = Rank 3: SpD
CHK_SuperTrain3_SPE = Rank 3: Spe
CHK_SecretUnlocked = Super Treino Activado
CHK_SecretComplete = Super Treino Concluído
CHK_SuperTrain4_1 = Rank 4: Problemas
CHK_SuperTrain5_1 = Rank 5: Erva
CHK_SuperTrain5_2 = Rank 5: Fogo
CHK_SuperTrain5_3 = Rank 5: Água
CHK_SuperTrain5_4 = Rank 5: Fugir
CHK_SuperTrain6_1 = Rank 6: Segundo
CHK_SuperTrain6_2 = Rank 6: Rápido
CHK_SuperTrain6_3 = Rank 6: Longo
CHK_SuperTrain7_1 = Rank 7: Dispersar
CHK_SuperTrain7_2 = Rank 7: Barragem
CHK_SuperTrain7_3 = Rank 7: Hydreigon
CHK_SuperTrain8_1 = Rank 8: Melhor
---
L_Bag = Última Mochila Utilizada:
L_Hits = Pancadas de Sobra:

View file

@ -0,0 +1 @@
20160830

View file

@ -291,37 +291,38 @@ B_None = 全部清除
B_Cancel = 取消
B_Save = 保存
------------------Super Training-----------------------
L_SuperTrain1_HP = 等级1: HP
L_SuperTrain1_ATK = 等级1: 攻击
L_SuperTrain1_DEF = 等级1: 防御
L_SuperTrain1_SPA = 等级1: 特攻
L_SuperTrain1_SPD = 等级1: 特防
L_SuperTrain1_SPE = 等级1: 速度
L_SuperTrain2_HP = 等级2: HP
L_SuperTrain2_ATK = 等级2: 攻击
L_SuperTrain2_DEF = 等级2: 防御
L_SuperTrain2_SPA = 等级2: 特攻
L_SuperTrain2_SPD = 等级2: 特防
L_SuperTrain2_SPE = 等级2: 速度
L_SuperTrain3_HP = 等级3: HP
L_SuperTrain3_ATK = 等级3: 攻击
L_SuperTrain3_DEF = 等级3: 防御
L_SuperTrain3_SPA = 等级3: 特攻
L_SuperTrain3_SPD = 等级3: 特防
L_SuperTrain3_SPE = 等级3: 速度
CHK_Secret = 秘密训练开启
L_SuperTrain4_1 = 等级4: 困境
L_SuperTrain5_1 = 等级5: 草之石
L_SuperTrain5_2 = 等级5: 火之石
L_SuperTrain5_3 = 等级5: 水之石
L_SuperTrain5_4 = 等级5: 逃跑
L_SuperTrain6_1 = 等级6: 反击战
L_SuperTrain6_2 = 等级6: 速攻战
L_SuperTrain6_3 = 等级6: 远距离
L_SuperTrain7_1 = 等级7: 逆袭粉蛹
L_SuperTrain7_2 = 等级7: 小气球
L_SuperTrain7_3 = 等级7: 三头龙
L_SuperTrain8_1 = 等级8: 最强之战
CHK_SuperTrain1_HP = 等级1: HP
CHK_SuperTrain1_ATK = 等级1: 攻击
CHK_SuperTrain1_DEF = 等级1: 防御
CHK_SuperTrain1_SPA = 等级1: 特攻
CHK_SuperTrain1_SPD = 等级1: 特防
CHK_SuperTrain1_SPE = 等级1: 速度
CHK_SuperTrain2_HP = 等级2: HP
CHK_SuperTrain2_ATK = 等级2: 攻击
CHK_SuperTrain2_DEF = 等级2: 防御
CHK_SuperTrain2_SPA = 等级2: 特攻
CHK_SuperTrain2_SPD = 等级2: 特防
CHK_SuperTrain2_SPE = 等级2: 速度
CHK_SuperTrain3_HP = 等级3: HP
CHK_SuperTrain3_ATK = 等级3: 攻击
CHK_SuperTrain3_DEF = 等级3: 防御
CHK_SuperTrain3_SPA = 等级3: 特攻
CHK_SuperTrain3_SPD = 等级3: 特防
CHK_SuperTrain3_SPE = 等级3: 速度
CHK_SecretUnlocked = 秘密训练开启
CHK_SecretComplete = 秘密训练完成
CHK_SuperTrain4_1 = 等级4: 困境
CHK_SuperTrain5_1 = 等级5: 草之石
CHK_SuperTrain5_2 = 等级5: 火之石
CHK_SuperTrain5_3 = 等级5: 水之石
CHK_SuperTrain5_4 = 等级5: 逃跑
CHK_SuperTrain6_1 = 等级6: 反击战
CHK_SuperTrain6_2 = 等级6: 速攻战
CHK_SuperTrain6_3 = 等级6: 远距离
CHK_SuperTrain7_1 = 等级7: 逆袭粉蛹
CHK_SuperTrain7_2 = 等级7: 小气球
CHK_SuperTrain7_3 = 等级7: 三头龙
CHK_SuperTrain8_1 = 等级8: 最强之战
---
L_Bag = 上一次使用物品:
L_Hits = 剩余点数:

View file

@ -1,4 +1,5 @@
using System;
using System.Linq;
namespace PKHeX
{
@ -23,7 +24,8 @@ namespace PKHeX
public readonly InventoryType Type;
public readonly ushort[] LegalItems;
public readonly int MaxCount;
private readonly int Offset;
public int Count => Items.Count(it => it.Count > 0);
public readonly int Offset;
private readonly int PouchDataSize;
public uint SecurityKey { private get; set; } // = 0 // Gen3 Only
public InventoryItem[] Items;
@ -61,5 +63,43 @@ namespace PKHeX
BitConverter.GetBytes((ushort)((ushort)Items[i].Count ^ (ushort)SecurityKey)).CopyTo(Data, Offset + i*4 + 2);
}
}
public void getPouchG1(ref byte[] Data)
{
InventoryItem[] items = new InventoryItem[PouchDataSize];
int numStored = Data[Offset];
for (int i = 0; i < numStored; i++)
{
items[i] = new InventoryItem
{
Index = Data[Offset + i * 2 + 1],
Count = Data[Offset + i * 2 + 2]
};
}
for (int i = numStored; i < items.Length; i++)
{
items[i] = new InventoryItem
{
Index = 0,
Count = 0
};
}
Items = items;
}
public void setPouchG1(ref byte[] Data)
{
if (Items.Length != PouchDataSize)
throw new ArgumentException("Item array length does not match original pouch size.");
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;
}
}
}

501
PKHeX/Saves/SAV1.cs Normal file
View file

@ -0,0 +1,501 @@
using System;
using System.Linq;
namespace PKHeX
{
public sealed class SAV1 : SaveFile
{
public override string BAKName => $"{FileName} [{OT} ({Version})" +/* - {LastSavedTime}*/ "].bak";
public override string Filter => "SAV File|*.sav";
public override string Extension => ".sav";
public SAV1(byte[] data = null)
{
Data = data == null ? new byte[SaveUtil.SIZE_G1RAW] : (byte[])data.Clone();
BAK = (byte[])Data.Clone();
Exportable = !Data.SequenceEqual(new byte[Data.Length]);
Version = data == null ? GameVersion.RBY : SaveUtil.getIsG1SAV(Data);
if (Version == GameVersion.Invalid)
return;
Box = Data.Length;
Array.Resize(ref Data, Data.Length + SIZE_RESERVED);
Party = getPartyOffset(0);
Japanese = SaveUtil.getIsG1SAVJ(data);
Personal = PersonalTable.RBY;
// Stash boxes after the save file's end.
byte[] TempBox = new byte[SIZE_STOREDBOX];
for (int i = 0; i < BoxCount; i++)
{
if (i < BoxCount / 2)
Array.Copy(Data, 0x4000 + i * TempBox.Length, TempBox, 0, TempBox.Length);
else
Array.Copy(Data, 0x6000 + (i - BoxCount / 2) * TempBox.Length, TempBox, 0, TempBox.Length);
PokemonList1 PL1 = new PokemonList1(TempBox, Japanese ? PokemonList1.CapacityType.StoredJP : PokemonList1.CapacityType.Stored, Japanese);
for (int j = 0; j < PL1.Pokemon.Length; j++)
{
if (j < PL1.Count)
{
byte[] pkDat = new PokemonList1(PL1[j]).GetBytes();
pkDat.CopyTo(Data, Data.Length - SIZE_RESERVED + i * SIZE_BOX + j * SIZE_STORED);
}
else
{
byte[] pkDat = new byte[PokemonList1.GetDataLength(PokemonList1.CapacityType.Single, Japanese)];
pkDat.CopyTo(Data, Data.Length - SIZE_RESERVED + i * SIZE_BOX + j * SIZE_STORED);
}
}
}
Array.Copy(Data, Japanese ? 0x302D : 0x30C0, TempBox, 0, TempBox.Length);
PokemonList1 curBoxPL = new PokemonList1(TempBox, Japanese ? PokemonList1.CapacityType.StoredJP : PokemonList1.CapacityType.Stored, Japanese);
for (int i = 0; i < curBoxPL.Pokemon.Length; i++)
{
if (i < curBoxPL.Count)
{
byte[] pkDat = new PokemonList1(curBoxPL[i]).GetBytes();
pkDat.CopyTo(Data, Data.Length - SIZE_RESERVED + CurrentBox * SIZE_BOX + i * SIZE_STORED);
}
else
{
byte[] pkDat = new byte[PokemonList1.GetDataLength(PokemonList1.CapacityType.Single, Japanese)];
pkDat.CopyTo(Data, Data.Length - SIZE_RESERVED + CurrentBox * SIZE_BOX + i * SIZE_STORED);
}
}
byte[] TempParty = new byte[PokemonList1.GetDataLength(PokemonList1.CapacityType.Party, Japanese)];
Array.Copy(Data, Japanese ? 0x2ED5 : 0x2F2C, TempParty, 0, TempParty.Length);
PokemonList1 partyList = new PokemonList1(TempParty, PokemonList1.CapacityType.Party, Japanese);
for (int i = 0; i < partyList.Pokemon.Length; i++)
{
if (i < partyList.Count)
{
byte[] pkDat = new PokemonList1(partyList[i]).GetBytes();
pkDat.CopyTo(Data, getPartyOffset(i));
}
else
{
byte[] pkDat = new byte[PokemonList1.GetDataLength(PokemonList1.CapacityType.Single, Japanese)];
pkDat.CopyTo(Data, getPartyOffset(i));
}
}
byte[] rawDC = new byte[0x38];
Array.Copy(Data, Japanese ? 0x2CA7 : 0x2CF4, rawDC, 0, rawDC.Length);
byte[] TempDaycare = new byte[PokemonList1.GetDataLength(PokemonList1.CapacityType.Single, Japanese)];
TempDaycare[0] = rawDC[0];
Array.Copy(rawDC, 1, TempDaycare, 2 + 1 + PKX.SIZE_1PARTY + StringLength, StringLength);
Array.Copy(rawDC, 1 + StringLength, TempDaycare, 2 + 1 + PKX.SIZE_1PARTY, StringLength);
Array.Copy(rawDC, 1 + 2 * StringLength, TempDaycare, 2 + 1, PKX.SIZE_1STORED);
PokemonList1 daycareList = new PokemonList1(TempDaycare, PokemonList1.CapacityType.Single, Japanese);
daycareList.GetBytes().CopyTo(Data, getPartyOffset(7));
Daycare = getPartyOffset(7);
// 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++)
{
PokemonList1 boxPL = new PokemonList1(Japanese ? PokemonList1.CapacityType.StoredJP : PokemonList1.CapacityType.Stored, Japanese);
int slot = 0;
for (int j = 0; j < boxPL.Pokemon.Length; j++)
{
PK1 boxPK = (PK1) getPKM(getData(getBoxOffset(i) + j*SIZE_STORED, SIZE_STORED));
if (boxPK.Species > 0)
boxPL[slot++] = boxPK;
}
if (i < BoxCount / 2)
boxPL.GetBytes().CopyTo(Data, 0x4000 + i * SIZE_STOREDBOX);
else
boxPL.GetBytes().CopyTo(Data, 0x6000 + (i - BoxCount / 2) * SIZE_STOREDBOX);
if (i == CurrentBox)
boxPL.GetBytes().CopyTo(Data, Japanese ? 0x302D : 0x30C0);
}
PokemonList1 partyPL = new PokemonList1(PokemonList1.CapacityType.Party, Japanese);
int pSlot = 0;
for (int i = 0; i < 6; i++)
{
PK1 partyPK = (PK1)getPKM(getData(getPartyOffset(i), SIZE_STORED));
if (partyPK.Species > 0)
partyPL[pSlot++] = partyPK;
}
partyPL.GetBytes().CopyTo(Data, Japanese ? 0x2ED5 : 0x2F2C);
// Daycare is read-only, but in case it ever becomes editable, copy it back in.
byte[] rawDC = getData(getDaycareSlotOffset(loc: 0, slot: 0), SIZE_STORED);
byte[] dc = new byte[1 + 2*StringLength + PKX.SIZE_1STORED];
dc[0] = rawDC[0];
Array.Copy(rawDC, 2 + 1 + PKX.SIZE_1PARTY + StringLength, dc, 1, StringLength);
Array.Copy(rawDC, 2 + 1 + PKX.SIZE_1PARTY, dc, 1 + StringLength, StringLength);
Array.Copy(rawDC, 2 + 1, dc, 1 + 2*StringLength, PKX.SIZE_1STORED);
dc.CopyTo(Data, Japanese ? 0x2CA7 : 0x2CF4);
setChecksums();
byte[] outData = new byte[Data.Length - SIZE_RESERVED];
Array.Copy(Data, outData, outData.Length);
return outData;
}
// Configuration
public override SaveFile Clone() { return new SAV1(Data.Take(Data.Length - SIZE_RESERVED).ToArray()); }
public override int SIZE_STORED => Japanese ? PKX.SIZE_1JLIST : PKX.SIZE_1ULIST;
public override int SIZE_PARTY => Japanese ? PKX.SIZE_1JLIST : PKX.SIZE_1ULIST;
public int SIZE_BOX => BoxSlotCount*SIZE_STORED;
public int SIZE_STOREDBOX => PokemonList1.GetDataLength(Japanese ? PokemonList1.CapacityType.StoredJP : PokemonList1.CapacityType.Stored, Japanese);
public override PKM BlankPKM => new PK1(null, null, Japanese);
protected override Type PKMType => typeof(PK1);
public override int MaxMoveID => 165;
public override int MaxSpeciesID => 151;
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 ? 8 : 12;
public override int MaxEV => 65535;
public override int MaxIV => 15;
public override int Generation => 1;
protected override int GiftCountMax => 0;
public override int OTLength => Japanese ? 5 : 10;
public override int NickLength => Japanese ? 5 : 10;
public override int BoxSlotCount => Japanese ? 30 : 20;
public override bool HasParty => true;
private int StringLength => Japanese ? PK1.STRLEN_J : PK1.STRLEN_U;
// Checksums
protected override void setChecksums()
{
int CHECKSUM_OFS = Japanese ? 0x3594 : 0x3523;
Data[CHECKSUM_OFS] = 0;
uint chksum = 0;
for (int i = 0x2598; i < CHECKSUM_OFS; i++)
{
chksum += Data[i];
}
chksum = ~chksum;
chksum &= 0xFF;
Data[CHECKSUM_OFS] = (byte)chksum;
}
public override bool ChecksumsValid
{
get
{
int CHECKSUM_OFS = Japanese ? 0x3594 : 0x3523;
Data[CHECKSUM_OFS] = 0;
uint chksum = 0;
for (int i = 0x2598; i < CHECKSUM_OFS; i++)
{
chksum += Data[i];
}
chksum = ~chksum;
chksum &= 0xFF;
return Data[CHECKSUM_OFS] == (byte)chksum;
}
}
public override string ChecksumInfo => ChecksumsValid ? "Checksum valid." : "Checksum invalid";
// Trainer Info
public override GameVersion Version { get; protected set; }
public override string OT
{
get { return PKX.getG1Str(Data.Skip(0x2598).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, 0x2598);
}
}
public override int Gender
{
get { return 0; }
set { }
}
public override ushort TID
{
get { return Util.SwapEndianness(BitConverter.ToUInt16(Data, Japanese ? 0x25FB : 0x2605)); }
set { BitConverter.GetBytes(Util.SwapEndianness(value)).CopyTo(Data, Japanese ? 0x25FB : 0x2605); }
}
public override ushort SID
{
get { return 0; }
set { }
}
public override int PlayedHours
{
get { return BitConverter.ToUInt16(Data, Japanese ? 0x2CA0 : 0x2CED); }
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, Japanese ? 0x2CA0 : 0x2CED); }
}
public override int PlayedMinutes
{
get { return Data[Japanese ? 0x2CA2 : 0x2CEF]; }
set { Data[Japanese ? 0x2CA2 : 0x2CEF] = (byte)value; }
}
public override int PlayedSeconds
{
get { return Data[Japanese ? 0x2CA3 : 0x2CF0]; }
set { Data[Japanese ? 0x2CA3 : 0x2CF0] = (byte)value; }
}
public int Badges
{
get { return Data[Japanese ? 0x25F8 : 0x2602]; }
set { if (value < 0) return; Data[Japanese ? 0x25F8 : 0x2602] = (byte)value; }
}
private byte Options
{
get { return Data[Japanese ? 0x25F7 : 0x2601]; }
set { Data[Japanese ? 0x25F7 : 0x2601] = 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 > 3)
new_sound = 3;
if (new_sound < 0)
new_sound = 0;
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 uint.Parse((Util.SwapEndianness(BitConverter.ToUInt32(Data, Japanese ? 0x25EE : 0x25F3)) >> 8).ToString("X6")); }
set
{
BitConverter.GetBytes(Util.SwapEndianness(Convert.ToUInt32(value.ToString("000000"), 16))).Skip(1).ToArray().CopyTo(Data, Japanese ? 0x25EE : 0x25F3);
}
}
public uint Coin
{
get
{
return uint.Parse(Util.SwapEndianness(BitConverter.ToUInt16(Data, Japanese ? 0x2846 : 0x2850)).ToString("X4"));
}
set
{
BitConverter.GetBytes(Util.SwapEndianness(Convert.ToUInt16(value.ToString("0000"), 16))).ToArray().CopyTo(Data, Japanese ? 0x2846 : 0x2850);
}
}
private readonly ushort[] LegalItems = PKX.getG1LegalItems().Select(i => (ushort)i).ToArray();
public override InventoryPouch[] Inventory
{
get
{
ushort[] legalItems = LegalItems;
InventoryPouch[] pouch =
{
new InventoryPouch(InventoryType.Items, legalItems, 99, Japanese ? 0x25C4 : 0x25C9, 20),
new InventoryPouch(InventoryType.MailItems, legalItems, 99, Japanese ? 0x27DC : 0x27E6, 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[Japanese ? 0x2ED5 : 0x2F2C]; }
protected set
{
Data[Japanese ? 0x2ED5 : 0x2F2C] = (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[Japanese ? 0x2842 : 0x284C] & 0x7F; }
set { Data[Japanese ? 0x2842 : 0x284C] = (byte)((Data[Japanese ? 0x2842 : 0x284C] & 0x80) | (value & 0x7F)); }
}
public override int getBoxWallpaper(int box)
{
return 0;
}
public override string getBoxName(int box)
{
return $"BOX {box + 1}";
}
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 PokemonList1(data, PokemonList1.CapacityType.Single, Japanese)[0];
return new PK1(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[(Japanese ? 0x25B1 : 0x25B6) + 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[(Japanese ? 0x259E : 0x25A3) + 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[(Japanese ? 0x25B1 : 0x25B6) + ofs] &= (byte)(~bitval);
if (seen)
Data[(Japanese ? 0x25B1 : 0x25B6) + 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[(Japanese ? 0x259E : 0x25A3) + ofs] &= (byte)(~bitval);
if (caught)
Data[(Japanese ? 0x259E : 0x25A3) + ofs] |= bitval;
}
}
}

View file

@ -692,7 +692,157 @@ namespace PKHeX
// Set the Species Seen Flag
Data[PokeDex + brSize*1 + bit/8 + 0x4] |= (byte) (1 << (bit%8));
// Formes : todo
int FormOffset1 = PokeDex + 0x108;
int PokeDexLanguageFlags = FormOffset1 + 0x20;
// Formes : Castform & Cherrim do not have entries (Battle Only formes)
// Lowest sub-value of formevalue is displayed, else is order of formes displayed.
// Deoxys forms 1-2 are stored in the last byte of the first bitRegion.
// Deoxys forms 3-4 are stored in the last byte of the second bitRegion.
if (pkm.Species == 386)
{
uint val = (uint)(Data[PokeDex + 0x4 + 1*brSize - 1] | Data[PokeDex + 0x4 + 2*brSize - 1] << 8);
int[] forms = getDexFormValues(val, 4, 4);
checkInsertForm(ref forms, pkm.AltForm);
uint newval = setDexFormValues(forms, 4, 4);
Data[PokeDex + 0x4 + 1*brSize - 1] = (byte)(newval & 0xFF);
Data[PokeDex + 0x4 + 2*brSize - 1] = (byte)((newval>>8) & 0xFF);
}
// After the BitRegions is 0x20 bytes for the rest of the formes.
// Standard Forme Bytes (DP)
// [Shellos-Gastrodon-Burmy-Wormadam],[Unown*0x1C]
if (pkm.Species == 422) // Shellos
{
int[] forms = getDexFormValues(Data[FormOffset1 + 0], 2, 2);
checkInsertForm(ref forms, pkm.AltForm);
uint newval = setDexFormValues(forms, 2, 2);
Data[FormOffset1 + 0] = (byte)newval;
}
if (pkm.Species == 423) // Gastrodon
{
int[] forms = getDexFormValues(Data[FormOffset1 + 1], 2, 2);
checkInsertForm(ref forms, pkm.AltForm);
uint newval = setDexFormValues(forms, 2, 2);
Data[FormOffset1 + 1] = (byte)newval;
}
if (pkm.Species == 412) // Burmy
{
int[] forms = getDexFormValues(Data[FormOffset1 + 2], 2, 3);
checkInsertForm(ref forms, pkm.AltForm);
uint newval = setDexFormValues(forms, 2, 3);
Data[FormOffset1 + 2] = (byte)newval;
}
if (pkm.Species == 413) // Wormadam
{
int[] forms = getDexFormValues(Data[FormOffset1 + 3], 2, 3);
checkInsertForm(ref forms, pkm.AltForm);
uint newval = setDexFormValues(forms, 2, 3);
Data[FormOffset1 + 3] = (byte)newval;
}
if (pkm.Species == 201) // Unown
{
for (int i = 0; i < 0x1C; i++)
{
byte val = Data[FormOffset1 + 4 + i];
if (val == pkm.AltForm)
break; // already set
if (val != 0xFF)
continue; // keep searching
Data[FormOffset1 + 4 + i] = (byte)pkm.AltForm;
break; // form now set
}
}
// DP stops here.
if (DP)
return;
// Set the Language
int lang = pkm.Language - 1;
if (lang > 5) lang = 0; // no KOR
if (lang < 0) lang = 1;
Data[PokeDexLanguageFlags + pkm.Species] |= (byte) (1 << lang);
int FormOffset2 = PokeDexLanguageFlags + 0x210;
// PtHGSS added more forms.
// [Rotom*4-highest bits unused],[Shaymin],[Giratina],[Pichu-HGSS ONLY]
if (pkm.Species == 479) // Rotom
{
int[] forms = getDexFormValues(BitConverter.ToUInt32(Data, FormOffset2), 3, 6);
checkInsertForm(ref forms, pkm.AltForm);
uint newval = setDexFormValues(forms, 3, 6);
BitConverter.GetBytes(newval).CopyTo(Data, FormOffset2);
}
if (pkm.Species == 492) // Shaymin
{
int[] forms = getDexFormValues(Data[FormOffset2 + 4], 2, 2);
uint newval = setDexFormValues(forms, 2, 2);
Data[FormOffset1 + 3] = (byte)newval;
}
if (pkm.Species == 487) // Giratina
{
int[] forms = getDexFormValues(Data[FormOffset2 + 5], 2, 2);
uint newval = setDexFormValues(forms, 2, 2);
Data[FormOffset1 + 3] = (byte)newval;
}
if (pkm.Species == 172 && HGSS) // Pichu
{
int[] forms = getDexFormValues(Data[FormOffset2 + 6], 2, 3);
uint newval = setDexFormValues(forms, 2, 3);
Data[FormOffset1 + 3] = (byte)newval;
}
}
private int[] getDexFormValues(uint Value, int BitsPerForm, int readCt)
{
int[] Forms = new int[readCt];
int n1 = 0xFF >> (8 - BitsPerForm);
for (int i = 0; i < Forms.Length; i++)
{
int val = (int)(Value >> (i*BitsPerForm))&n1;
if (n1 == val)
Forms[i] = -1;
else
Forms[i] = val;
}
return Forms;
}
private uint setDexFormValues(int[] Forms, int BitsPerForm, int readCt)
{
int n1 = 0xFF >> (8 - BitsPerForm);
uint Value = 0xFFFFFFFF << (Forms.Length*BitsPerForm);
for (int i = 0; i < Forms.Length; i++)
{
int val = Forms[i];
if (val == -1)
val = n1;
Value |= (uint)(val << (BitsPerForm*i));
}
return Value;
}
private bool checkInsertForm(ref int[] Forms, int FormNum)
{
if (Forms.Any(num => num == FormNum))
{
return false; // already in list
}
if (Forms.All(num => num == -1))
{
Forms[0] = FormNum;
return true; // none in list, insert at top
}
// insert at first empty
int n1 = Array.IndexOf(Forms, -1);
if (n1 < 0)
return false;
Forms[n1] = FormNum;
return true;
}
}
}

View file

@ -622,25 +622,47 @@ namespace PKHeX
int shiftoff = shiny * brSize * 2 + gender * brSize + brSize;
// Set the Species Owned Flag
Data[PokeDex + bit / 8 + 0x8] |= (byte)(1 << (bit % 8));
Data[PokeDex + 0x8 + bit / 8] |= (byte)(1 << (bit % 8));
// Set the [Species/Gender/Shiny] Seen Flag
Data[PokeDex + shiftoff + bit / 8 + 0x8] |= (byte)(1 << (bit % 8));
Data[PokeDex + 0x8 + shiftoff + bit / 8] |= (byte)(1 << (bit % 8));
// Set the Display flag if none are set
bool Displayed = false;
Displayed |= (Data[PokeDex + brSize * 5 + bit / 8 + 0x8] & (byte)(1 << (bit % 8))) != 0;
Displayed |= (Data[PokeDex + brSize * 6 + bit / 8 + 0x8] & (byte)(1 << (bit % 8))) != 0;
Displayed |= (Data[PokeDex + brSize * 7 + bit / 8 + 0x8] & (byte)(1 << (bit % 8))) != 0;
Displayed |= (Data[PokeDex + brSize * 8 + bit / 8 + 0x8] & (byte)(1 << (bit % 8))) != 0;
if (!Displayed) // offset is already biased by 0x60, reuse shiftoff but for the display flags.
Data[PokeDex + shiftoff + brSize * 4 + bit / 8 + 0x8] |= (byte)(1 << (bit % 8));
Displayed |= (Data[PokeDex + 0x8 + brSize*5 + bit/8] & (byte)(1 << (bit%8))) != 0;
Displayed |= (Data[PokeDex + 0x8 + brSize*6 + bit/8] & (byte)(1 << (bit%8))) != 0;
Displayed |= (Data[PokeDex + 0x8 + brSize*7 + bit/8] & (byte)(1 << (bit%8))) != 0;
Displayed |= (Data[PokeDex + 0x8 + brSize*8 + bit/8] & (byte)(1 << (bit%8))) != 0;
if (!Displayed) // offset is already biased by brSize, reuse shiftoff but for the display flags.
Data[PokeDex + 0x8 + shiftoff + brSize*4 + bit/8] |= (byte)(1 << (bit%8));
// Set the Language
if (lang < 0) lang = 1;
Data[PokeDexLanguageFlags + (bit*7 + lang) / 8] |= (byte)(1 << ((bit*7 + lang) % 8));
// Formes : todo
// Formes
int fc = Personal[pkm.Species].FormeCount;
int f = B2W2 ? SaveUtil.getDexFormIndexB2W2(pkm.Species, fc) : SaveUtil.getDexFormIndexBW(pkm.Species, fc);
if (f < 0) return;
int FormLen = B2W2 ? 0xB : 0x9;
int FormDex = PokeDex + 0x8 + brSize*9;
bit = f + pkm.AltForm;
// Set Form Seen Flag
Data[FormDex + FormLen*shiny + bit/8] |= (byte)(1 << (bit%8));
// Set Displayed Flag if necessary, check all flags
for (int i = 0; i < fc; i++)
{
bit = f + i;
if ((Data[FormDex + FormLen*2 + bit/8] & (byte)(1 << (bit%8))) != 0) // Nonshiny
return; // already set
if ((Data[FormDex + FormLen*3 + bit/8] & (byte)(1 << (bit%8))) != 0) // Shiny
return; // already set
}
bit = f + pkm.AltForm;
Data[FormDex + FormLen * (2 + shiny) + bit / 8] |= (byte)(1 << (bit % 8));
}
}
}

View file

@ -730,35 +730,33 @@ namespace PKHeX
if (lang < 0) lang = 1;
Data[PokeDexLanguageFlags + (bit * 7 + lang) / 8] |= (byte)(1 << ((bit * 7 + lang) % 8));
// Set Form flags
int fc = Personal[pkm.Species].FormeCount;
int f = ORAS ? SaveUtil.getDexFormIndexORAS(pkm.Species, fc) : SaveUtil.getDexFormIndexXY(pkm.Species, fc);
if (f >= 0)
{
int FormLen = ORAS ? 0x26 : 0x18;
int FormDex = PokeDex + 0x368;
bit = f + pkm.AltForm;
// Set Seen Flag
Data[FormDex + FormLen * shiny + bit / 8] |= (byte)(1 << (bit % 8));
// Set Displayed Flag if necessary, check all flags
bool FormDisplayed = false;
for (int i = 0; i < fc; i++)
{
bit = f + i;
FormDisplayed |= (Data[FormDex + FormLen * 2 + bit / 8] & (byte)(1 << (bit % 8))) != 0; // Nonshiny
FormDisplayed |= (Data[FormDex + FormLen * 3 + bit / 8] & (byte)(1 << (bit % 8))) != 0; // Shiny
}
if (!FormDisplayed)
{
bit = f + pkm.AltForm;
Data[FormDex + FormLen * (2 + shiny) + bit / 8] |= (byte)(1 << (bit % 8));
}
}
// Set DexNav count (only if not encountered previously)
if (ORAS && getEncounterCount(pkm.Species - 1) == 0)
setEncounterCount(pkm.Species - 1, 1);
// Set Form flags
int fc = Personal[pkm.Species].FormeCount;
int f = ORAS ? SaveUtil.getDexFormIndexORAS(pkm.Species, fc) : SaveUtil.getDexFormIndexXY(pkm.Species, fc);
if (f < 0) return;
int FormLen = ORAS ? 0x26 : 0x18;
int FormDex = PokeDex + 0x8 + brSize*9;
bit = f + pkm.AltForm;
// Set Form Seen Flag
Data[FormDex + FormLen*shiny + bit/8] |= (byte)(1 << (bit%8));
// Set Displayed Flag if necessary, check all flags
for (int i = 0; i < fc; i++)
{
bit = f + i;
if ((Data[FormDex + FormLen*2 + bit/8] & (byte) (1 << (bit%8))) != 0) // Nonshiny
return; // already set
if ((Data[FormDex + FormLen*3 + bit/8] & (byte) (1 << (bit%8))) != 0) // Shiny
return; // already set
}
bit = f + pkm.AltForm;
Data[FormDex + FormLen * (2 + shiny) + bit / 8] |= (byte)(1 << (bit % 8));
}
public override byte[] decryptPKM(byte[] data)
{

View file

@ -21,6 +21,8 @@ namespace PKHeX
public byte[] Footer { protected get; set; } = new byte[0]; // .dsv
public bool Japanese { protected get; set; }
public bool GetJapanese => Japanese;
// General PKM Properties
protected abstract Type PKMType { get; }
public abstract PKM getPKM(byte[] data);
@ -29,6 +31,7 @@ namespace PKHeX
public abstract int SIZE_STORED { get; }
public abstract int SIZE_PARTY { get; }
public abstract int MaxEV { get; }
public virtual int MaxIV => 31;
public ushort[] HeldItems { get; protected set; }
// General SAV Properties
@ -58,6 +61,7 @@ namespace PKHeX
public bool E => Version == GameVersion.E;
public bool FRLG => Version == GameVersion.FRLG;
public bool RS => Version == GameVersion.RS;
public bool RBY => Version == GameVersion.RBY;
public virtual int MaxMoveID => int.MaxValue;
public virtual int MaxSpeciesID => int.MaxValue;
@ -127,13 +131,13 @@ namespace PKHeX
{
get
{
PKM[] data = new PKM[BoxCount*30];
PKM[] data = new PKM[BoxCount*BoxSlotCount];
for (int i = 0; i < data.Length; i++)
{
data[i] = getStoredSlot(getBoxOffset(i/30) + SIZE_STORED*(i%30));
data[i].Identifier = $"{getBoxName(i/30)}:{(i%30 + 1).ToString("00")}";
data[i].Box = i/30 + 1;
data[i].Slot = i%30 + 1;
data[i] = getStoredSlot(getBoxOffset(i/BoxSlotCount) + SIZE_STORED*(i%BoxSlotCount));
data[i].Identifier = $"{getBoxName(i/BoxSlotCount)}:{(i%BoxSlotCount + 1).ToString("00")}";
data[i].Box = i/BoxSlotCount + 1;
data[i].Slot = i%BoxSlotCount + 1;
}
return data;
}
@ -141,13 +145,13 @@ namespace PKHeX
{
if (value == null)
throw new ArgumentNullException();
if (value.Length != BoxCount*30)
throw new ArgumentException($"Expected {BoxCount*30}, got {value.Length}");
if (value.Length != BoxCount*BoxSlotCount)
throw new ArgumentException($"Expected {BoxCount*BoxSlotCount}, got {value.Length}");
if (value.Any(pk => PKMType != pk.GetType()))
throw new ArgumentException($"Not {PKMType} array.");
for (int i = 0; i < value.Length; i++)
setStoredSlot(value[i], getBoxOffset(i/30) + SIZE_STORED*(i%30));
setStoredSlot(value[i], getBoxOffset(i/BoxSlotCount) + SIZE_STORED*(i%BoxSlotCount));
}
}
public PKM[] PartyData
@ -260,6 +264,7 @@ namespace PKHeX
protected int OFS_PouchBalls { get; set; } = int.MinValue;
protected int OFS_BattleItems { get; set; } = int.MinValue;
protected int OFS_MailItems { get; set; } = int.MinValue;
protected int OFS_PCItem { get; set; } = int.MinValue;
// Mystery Gift
protected virtual bool[] MysteryGiftReceivedFlags { get { return null; } set { } }
@ -328,6 +333,7 @@ namespace PKHeX
public abstract void setDaycareOccupied(int loc, int slot, bool occupied);
// Storage
public virtual int BoxSlotCount => 30;
public PKM getPartySlot(int offset)
{
return getPKM(decryptPKM(getData(offset, SIZE_PARTY)));
@ -355,7 +361,7 @@ namespace PKHeX
Console.WriteLine("");
Edited = true;
}
public void setStoredSlot(PKM pkm, int offset, bool? trade = null, bool? dex = null)
public virtual void setStoredSlot(PKM pkm, int offset, bool? trade = null, bool? dex = null)
{
if (pkm == null) return;
if (pkm.GetType() != PKMType)
@ -415,9 +421,9 @@ namespace PKHeX
public void sortBoxes(int BoxStart = 0, int BoxEnd = -1)
{
PKM[] BD = BoxData;
var Section = BD.Skip(BoxStart*30);
var Section = BD.Skip(BoxStart*BoxSlotCount);
if (BoxEnd > BoxStart)
Section = Section.Take(30*(BoxEnd - BoxStart));
Section = Section.Take(BoxSlotCount*(BoxEnd - BoxStart));
var Sorted = Section
.OrderBy(p => p.Species == 0) // empty slots at end
@ -425,7 +431,7 @@ namespace PKHeX
.ThenBy(p => p.Species) // species sorted
.ThenBy(p => p.IsNicknamed).ToArray();
Array.Copy(Sorted, 0, BD, BoxStart*30, Sorted.Length);
Array.Copy(Sorted, 0, BD, BoxStart*BoxSlotCount, Sorted.Length);
BoxData = BD;
}
public void resetBoxes(int BoxStart = 0, int BoxEnd = -1)
@ -435,13 +441,13 @@ namespace PKHeX
for (int i = BoxStart; i < BoxEnd; i++)
{
int offset = getBoxOffset(i);
for (int p = 0; p < 30; p++)
for (int p = 0; p < BoxSlotCount; p++)
setStoredSlot(BlankPKM, offset + SIZE_STORED * p);
}
}
public byte[] getPCBin() { return BoxData.SelectMany(pk => pk.EncryptedBoxData).ToArray(); }
public byte[] getBoxBin(int box) { return BoxData.Skip(box*30).Take(30).SelectMany(pk => pk.EncryptedBoxData).ToArray(); }
public byte[] getBoxBin(int box) { return BoxData.Skip(box*BoxSlotCount).Take(BoxSlotCount).SelectMany(pk => pk.EncryptedBoxData).ToArray(); }
public bool setPCBin(byte[] data)
{
if (data.Length != getPCBin().Length)
@ -474,14 +480,23 @@ namespace PKHeX
}
PKM[] pkms = BoxData;
for (int i = 0; i < 30; i++)
pkms[box*30 + i].Data = decryptPKM(pkdata[i]);
for (int i = 0; i < BoxSlotCount; i++)
pkms[box*BoxSlotCount + i].Data = decryptPKM(pkdata[i]);
BoxData = pkms;
return true;
}
protected virtual void setPKM(PKM pkm) { }
protected virtual void setDex(PKM pkm) { }
protected virtual void setDex(PKM pkm)
{
setSeen(pkm);
setCaught(pkm);
}
public virtual bool getSeen(PKM pkm) { throw new NotImplementedException(); }
public virtual bool getCaught(PKM pkm) { throw new NotImplementedException(); }
protected internal virtual void setSeen(PKM pkm, bool seen = true) { }
protected internal virtual void setCaught(PKM pkm, bool caught = true) { }
public byte[] getData(int Offset, int Length)
{

View file

@ -18,6 +18,8 @@ namespace PKHeX
SN = 28, MN = 29,
// Game Groupings (SaveFile type)
RBY = 98,
GSC = 99,
RS = 100,
FRLG = 101,
DP = 102,
@ -43,6 +45,8 @@ namespace PKHeX
internal const int SIZE_G4RAW = 0x80000;
internal const int SIZE_G3RAW = 0x20000;
internal const int SIZE_G3RAWHALF = 0x10000;
internal const int SIZE_G1RAW = 0x8000;
internal const int SIZE_G1BAT = 0x802C;
internal static readonly byte[] FOOTER_DSV = Encoding.ASCII.GetBytes("|-DESMUME SAVE-|");
@ -51,6 +55,8 @@ namespace PKHeX
/// <returns>Version Identifier or Invalid if type cannot be determined.</returns>
public static int getSAVGeneration(byte[] data)
{
if (getIsG1SAV(data) != GameVersion.Invalid)
return 1;
if (getIsG3SAV(data) != GameVersion.Invalid)
return 3;
if (getIsG4SAV(data) != GameVersion.Invalid)
@ -61,6 +67,47 @@ namespace PKHeX
return 6;
return -1;
}
/// <summary>Determines the type of 1st 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 getIsG1SAV(byte[] data)
{
if (data.Length != SIZE_G1RAW && data.Length != SIZE_G1BAT)
return GameVersion.Invalid;
// Check if it's not an american save or a japanese save
if (!(getIsG1SAVU(data) || getIsG1SAVJ(data)))
return GameVersion.Invalid;
// I can't actually detect which game version, because it's not stored anywhere.
// If you can think of anything to do here, please implement :)
return GameVersion.RBY;
}
/// <summary>Determines if 1st 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 bool getIsG1SAVU(byte[] data)
{
foreach (int ofs in new[] { 0x2F2C, 0x30C0 })
{
byte num_entries = data[ofs];
if (num_entries > 20 || data[ofs + 1 + num_entries] != 0xFF)
return false;
}
return true;
}
/// <summary>Determines if 1st 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 bool getIsG1SAVJ(byte[] data)
{
foreach (int ofs in new[] { 0x2ED5, 0x302D })
{
byte num_entries = data[ofs];
if (num_entries > 30 || data[ofs + 1 + num_entries] != 0xFF)
return false;
}
return true;
}
/// <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>
@ -158,6 +205,62 @@ namespace PKHeX
return GameVersion.Invalid;
}
/// <summary>Determines the Version Grouping of an input Version ID</summary>
/// <param name="Version">Version of which to determine the group</param>
/// <returns>Version Group Identifier or Invalid if type cannot be determined.</returns>
public static GameVersion getVersionGroup(GameVersion Version)
{
switch (Version)
{
case GameVersion.CXD:
return GameVersion.CXD;
case GameVersion.RBY:
return GameVersion.RBY;
case GameVersion.R:
case GameVersion.S:
return GameVersion.RS;
case GameVersion.E:
return GameVersion.E;
case GameVersion.FR:
case GameVersion.LG:
return GameVersion.FR;
case GameVersion.D:
case GameVersion.P:
return GameVersion.DP;
case GameVersion.Pt:
return GameVersion.Pt;
case GameVersion.HG:
case GameVersion.SS:
return GameVersion.HGSS;
case GameVersion.B:
case GameVersion.W:
return GameVersion.BW;
case GameVersion.B2:
case GameVersion.W2:
return GameVersion.B2W2;
case GameVersion.X:
case GameVersion.Y:
return GameVersion.XY;
case GameVersion.OR:
case GameVersion.AS:
return GameVersion.ORAS;
default:
return GameVersion.Invalid;
}
}
/// <summary>Creates an instance of a SaveFile using the given save data.</summary>
/// <param name="data">Save data from which to create a SaveFile.</param>
/// <returns>An appropriate type of save file for the given data, or null if the save data is invalid.</returns>
@ -165,6 +268,8 @@ namespace PKHeX
{
switch (getSAVGeneration(data))
{
case 1:
return new SAV1(data);
case 3:
return new SAV3(data);
case 4:
@ -286,7 +391,7 @@ namespace PKHeX
return (ushort)((val & 0xFFFF) + (val >> 16));
}
public static int getDexFormIndexXY(int species, int formct)
public static int getDexFormIndexBW(int species, int formct)
{
if (formct < 1 || species < 0)
return -1; // invalid
@ -308,11 +413,29 @@ namespace PKHeX
case 648: return 066; // 2 Meloetta
case 555: return 068; // 2 Darmanitan
case 550: return 070; // 2 Basculin
default: return -1;
}
}
public static int getDexFormIndexB2W2(int species, int formct)
{
if (formct < 1 || species < 0)
return -1; // invalid
switch (species)
{
case 646: return 072; // 3 Kyurem
case 647: return 075; // 2 Keldeo
case 642: return 077; // 2 Thundurus
case 641: return 079; // 2 Tornadus
case 645: return 081; // 2 Landorus
default: return getDexFormIndexBW(species, formct);
}
}
public static int getDexFormIndexXY(int species, int formct)
{
if (formct < 1 || species < 0)
return -1; // invalid
switch (species)
{
case 666: return 083; // 20 Vivillion
case 669: return 103; // 5 Flabébé
case 670: return 108; // 6 Floette
@ -349,7 +472,7 @@ namespace PKHeX
case 445: return 183; // 2 Garchomp
case 448: return 185; // 2 Lucario
case 460: return 187; // 2 Abomasnow
default: return -1;
default: return getDexFormIndexB2W2(species, formct);
}
}
public static int getDexFormIndexORAS(int species, int formct)

View file

@ -36,7 +36,8 @@
this.PAN_Training = new System.Windows.Forms.Panel();
this.SPLIT_Training = new System.Windows.Forms.SplitContainer();
this.TLP_SuperTrain = new System.Windows.Forms.TableLayoutPanel();
this.CHK_Secret = new System.Windows.Forms.CheckBox();
this.CHK_SecretComplete = new System.Windows.Forms.CheckBox();
this.CHK_SecretUnlocked = new System.Windows.Forms.CheckBox();
this.CB_Bag = new System.Windows.Forms.ComboBox();
this.L_Bag = new System.Windows.Forms.Label();
this.NUD_BagHits = new System.Windows.Forms.NumericUpDown();
@ -123,7 +124,8 @@
//
// SPLIT_Training.Panel2
//
this.SPLIT_Training.Panel2.Controls.Add(this.CHK_Secret);
this.SPLIT_Training.Panel2.Controls.Add(this.CHK_SecretComplete);
this.SPLIT_Training.Panel2.Controls.Add(this.CHK_SecretUnlocked);
this.SPLIT_Training.Panel2.Controls.Add(this.CB_Bag);
this.SPLIT_Training.Panel2.Controls.Add(this.L_Bag);
this.SPLIT_Training.Panel2.Controls.Add(this.NUD_BagHits);
@ -150,23 +152,34 @@
this.TLP_SuperTrain.Size = new System.Drawing.Size(173, 229);
this.TLP_SuperTrain.TabIndex = 4;
//
// CHK_Secret
// CHK_SecretComplete
//
this.CHK_Secret.AutoSize = true;
this.CHK_Secret.Location = new System.Drawing.Point(2, 2);
this.CHK_Secret.Name = "CHK_Secret";
this.CHK_Secret.Size = new System.Drawing.Size(171, 17);
this.CHK_Secret.TabIndex = 36;
this.CHK_Secret.Text = "Secret Super Training Enabled";
this.CHK_Secret.UseVisualStyleBackColor = true;
this.CHK_Secret.CheckedChanged += new System.EventHandler(this.CHK_Secret_CheckedChanged);
this.CHK_SecretComplete.AutoSize = true;
this.CHK_SecretComplete.Enabled = false;
this.CHK_SecretComplete.Location = new System.Drawing.Point(3, 17);
this.CHK_SecretComplete.Name = "CHK_SecretComplete";
this.CHK_SecretComplete.Size = new System.Drawing.Size(145, 17);
this.CHK_SecretComplete.TabIndex = 37;
this.CHK_SecretComplete.Text = "Secret Training Complete";
this.CHK_SecretComplete.UseVisualStyleBackColor = true;
//
// CHK_SecretUnlocked
//
this.CHK_SecretUnlocked.AutoSize = true;
this.CHK_SecretUnlocked.Location = new System.Drawing.Point(3, 2);
this.CHK_SecretUnlocked.Name = "CHK_SecretUnlocked";
this.CHK_SecretUnlocked.Size = new System.Drawing.Size(147, 17);
this.CHK_SecretUnlocked.TabIndex = 36;
this.CHK_SecretUnlocked.Text = "Secret Training Unlocked";
this.CHK_SecretUnlocked.UseVisualStyleBackColor = true;
this.CHK_SecretUnlocked.CheckedChanged += new System.EventHandler(this.CHK_Secret_CheckedChanged);
//
// CB_Bag
//
this.CB_Bag.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.CB_Bag.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CB_Bag.FormattingEnabled = true;
this.CB_Bag.Location = new System.Drawing.Point(46, 50);
this.CB_Bag.Location = new System.Drawing.Point(46, 54);
this.CB_Bag.Name = "CB_Bag";
this.CB_Bag.Size = new System.Drawing.Size(138, 21);
this.CB_Bag.TabIndex = 35;
@ -174,7 +187,7 @@
// L_Bag
//
this.L_Bag.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.L_Bag.Location = new System.Drawing.Point(31, 34);
this.L_Bag.Location = new System.Drawing.Point(31, 38);
this.L_Bag.Name = "L_Bag";
this.L_Bag.Size = new System.Drawing.Size(100, 13);
this.L_Bag.TabIndex = 34;
@ -184,7 +197,7 @@
// NUD_BagHits
//
this.NUD_BagHits.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.NUD_BagHits.Location = new System.Drawing.Point(134, 75);
this.NUD_BagHits.Location = new System.Drawing.Point(134, 79);
this.NUD_BagHits.Maximum = new decimal(new int[] {
255,
0,
@ -203,7 +216,7 @@
// L_Hits
//
this.L_Hits.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.L_Hits.Location = new System.Drawing.Point(31, 77);
this.L_Hits.Location = new System.Drawing.Point(31, 81);
this.L_Hits.Name = "L_Hits";
this.L_Hits.Size = new System.Drawing.Size(100, 13);
this.L_Hits.TabIndex = 32;
@ -264,8 +277,9 @@
private System.Windows.Forms.NumericUpDown NUD_BagHits;
private System.Windows.Forms.Label L_Bag;
private System.Windows.Forms.ComboBox CB_Bag;
private System.Windows.Forms.CheckBox CHK_Secret;
private System.Windows.Forms.CheckBox CHK_SecretUnlocked;
private System.Windows.Forms.TableLayoutPanel TLP_SuperTrain;
private System.Windows.Forms.SplitContainer SPLIT_Training;
private System.Windows.Forms.CheckBox CHK_SecretComplete;
}
}

View file

@ -32,8 +32,9 @@ namespace PKHeX
if (pkm is PK6)
{
PK6 pk6 = (PK6) pkm;
CHK_Secret.Checked = pk6.SecretSuperTraining;
if (!CHK_Secret.Checked) // force update to disable checkboxes
CHK_SecretUnlocked.Checked = pk6.SecretSuperTrainingUnlocked;
CHK_SecretComplete.Checked = pk6.SecretSuperTrainingComplete;
if (!CHK_SecretUnlocked.Checked) // force update to disable checkboxes
CHK_Secret_CheckedChanged(null, null);
CB_Bag.SelectedIndex = pk6.TrainingBag;
NUD_BagHits.Value = pk6.TrainingBagHits;
@ -111,7 +112,8 @@ namespace PKHeX
if (pkm is PK6)
{
PK6 pk6 = (PK6) pkm;
pk6.SecretSuperTraining = CHK_Secret.Checked;
pk6.SecretSuperTrainingUnlocked = CHK_SecretUnlocked.Checked;
pk6.SecretSuperTrainingComplete = CHK_SecretComplete.Checked;
pk6.TrainingBag = CB_Bag.SelectedIndex;
pk6.TrainingBagHits = (int)NUD_BagHits.Value;
}
@ -132,7 +134,8 @@ namespace PKHeX
private void B_All_Click(object sender, EventArgs e)
{
CHK_Secret.Checked = true;
CHK_SecretUnlocked.Checked = true;
CHK_SecretComplete.Checked = true;
foreach (var c in TLP_SuperTrain.Controls.OfType<CheckBox>())
c.Checked = true;
foreach (var c in TLP_DistSuperTrain.Controls.OfType<CheckBox>())
@ -140,7 +143,8 @@ namespace PKHeX
}
private void B_None_Click(object sender, EventArgs e)
{
CHK_Secret.Checked = false;
CHK_SecretUnlocked.Checked = false;
CHK_SecretComplete.Checked = false;
foreach (var c in TLP_SuperTrain.Controls.OfType<CheckBox>())
c.Checked = false;
foreach (var c in TLP_DistSuperTrain.Controls.OfType<CheckBox>())
@ -148,10 +152,12 @@ namespace PKHeX
}
private void CHK_Secret_CheckedChanged(object sender, EventArgs e)
{
CHK_SecretComplete.Checked &= CHK_SecretUnlocked.Checked;
CHK_SecretComplete.Enabled = CHK_SecretUnlocked.Checked;
foreach (var c in TLP_SuperTrain.Controls.OfType<CheckBox>().Where(chk => Convert.ToInt16(chk.Name[14]+"") >= 4))
{
c.Enabled = CHK_Secret.Checked;
if (!CHK_Secret.Checked)
c.Enabled = CHK_SecretUnlocked.Checked;
if (!CHK_SecretUnlocked.Checked)
c.Checked = false;
}
}

View file

@ -86,7 +86,7 @@ namespace PKHeX
{
data[c] = 1;
}
Array.Copy(data, 0, Main.SAV.Data, o + offsets[i], data.Length);
Array.Copy(data, 0, SAV.Data, o + offsets[i], data.Length);
}
// Save Maxes

View file

@ -181,6 +181,10 @@ namespace PKHeX
this.Tab_Overview = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.L_Started = new System.Windows.Forms.Label();
this.CAL_AdventureStartDate = new System.Windows.Forms.DateTimePicker();
this.CAL_AdventureStartTime = new System.Windows.Forms.DateTimePicker();
this.CAL_LastSavedTime = new System.Windows.Forms.DateTimePicker();
this.Tab_BadgeMap = new System.Windows.Forms.TabPage();
this.GB_Map = new System.Windows.Forms.GroupBox();
this.NUD_Z = new System.Windows.Forms.NumericUpDown();
@ -195,10 +199,9 @@ namespace PKHeX
this.Tab_Multiplayer = new System.Windows.Forms.TabPage();
this.Tab_Maison = new System.Windows.Forms.TabPage();
this.Tab_Appearance = new System.Windows.Forms.TabPage();
this.CAL_AdventureStartTime = new System.Windows.Forms.DateTimePicker();
this.CAL_AdventureStartDate = new System.Windows.Forms.DateTimePicker();
this.L_Started = new System.Windows.Forms.Label();
this.CAL_LastSavedTime = new System.Windows.Forms.DateTimePicker();
this.L_Fame = new System.Windows.Forms.Label();
this.CAL_HoFDate = new System.Windows.Forms.DateTimePicker();
this.CAL_HoFTime = new System.Windows.Forms.DateTimePicker();
((System.ComponentModel.ISupportInitialize)(this.PB_Badge8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PB_Badge6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PB_Badge4)).BeginInit();
@ -620,7 +623,7 @@ namespace PKHeX
//
// L_LastSaved
//
this.L_LastSaved.Location = new System.Drawing.Point(4, 107);
this.L_LastSaved.Location = new System.Drawing.Point(3, 110);
this.L_LastSaved.Name = "L_LastSaved";
this.L_LastSaved.Size = new System.Drawing.Size(80, 20);
this.L_LastSaved.TabIndex = 32;
@ -630,7 +633,7 @@ namespace PKHeX
// CAL_LastSavedDate
//
this.CAL_LastSavedDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.CAL_LastSavedDate.Location = new System.Drawing.Point(90, 107);
this.CAL_LastSavedDate.Location = new System.Drawing.Point(89, 110);
this.CAL_LastSavedDate.MaxDate = new System.DateTime(4095, 12, 31, 0, 0, 0, 0);
this.CAL_LastSavedDate.Name = "CAL_LastSavedDate";
this.CAL_LastSavedDate.Size = new System.Drawing.Size(99, 20);
@ -640,7 +643,7 @@ namespace PKHeX
// L_Seconds
//
this.L_Seconds.AutoSize = true;
this.L_Seconds.Location = new System.Drawing.Point(136, 20);
this.L_Seconds.Location = new System.Drawing.Point(136, 17);
this.L_Seconds.Name = "L_Seconds";
this.L_Seconds.Size = new System.Drawing.Size(29, 13);
this.L_Seconds.TabIndex = 30;
@ -649,7 +652,7 @@ namespace PKHeX
// L_Minutes
//
this.L_Minutes.AutoSize = true;
this.L_Minutes.Location = new System.Drawing.Point(84, 20);
this.L_Minutes.Location = new System.Drawing.Point(84, 17);
this.L_Minutes.Name = "L_Minutes";
this.L_Minutes.Size = new System.Drawing.Size(27, 13);
this.L_Minutes.TabIndex = 29;
@ -657,7 +660,7 @@ namespace PKHeX
//
// MT_Seconds
//
this.MT_Seconds.Location = new System.Drawing.Point(166, 17);
this.MT_Seconds.Location = new System.Drawing.Point(166, 14);
this.MT_Seconds.Mask = "00";
this.MT_Seconds.Name = "MT_Seconds";
this.MT_Seconds.Size = new System.Drawing.Size(22, 20);
@ -667,7 +670,7 @@ namespace PKHeX
//
// MT_Minutes
//
this.MT_Minutes.Location = new System.Drawing.Point(111, 17);
this.MT_Minutes.Location = new System.Drawing.Point(111, 14);
this.MT_Minutes.Mask = "00";
this.MT_Minutes.Name = "MT_Minutes";
this.MT_Minutes.Size = new System.Drawing.Size(22, 20);
@ -678,7 +681,7 @@ namespace PKHeX
// L_Hours
//
this.L_Hours.AutoSize = true;
this.L_Hours.Location = new System.Drawing.Point(12, 20);
this.L_Hours.Location = new System.Drawing.Point(12, 17);
this.L_Hours.Name = "L_Hours";
this.L_Hours.Size = new System.Drawing.Size(26, 13);
this.L_Hours.TabIndex = 26;
@ -686,7 +689,7 @@ namespace PKHeX
//
// MT_Hours
//
this.MT_Hours.Location = new System.Drawing.Point(44, 17);
this.MT_Hours.Location = new System.Drawing.Point(44, 14);
this.MT_Hours.Mask = "00000";
this.MT_Hours.Name = "MT_Hours";
this.MT_Hours.Size = new System.Drawing.Size(38, 20);
@ -1826,6 +1829,9 @@ namespace PKHeX
//
// groupBox2
//
this.groupBox2.Controls.Add(this.L_Fame);
this.groupBox2.Controls.Add(this.CAL_HoFDate);
this.groupBox2.Controls.Add(this.CAL_HoFTime);
this.groupBox2.Controls.Add(this.L_Started);
this.groupBox2.Controls.Add(this.CAL_AdventureStartDate);
this.groupBox2.Controls.Add(this.CAL_LastSavedDate);
@ -1845,6 +1851,52 @@ namespace PKHeX
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Adventure Info";
//
// L_Started
//
this.L_Started.Location = new System.Drawing.Point(3, 35);
this.L_Started.Name = "L_Started";
this.L_Started.Size = new System.Drawing.Size(80, 20);
this.L_Started.TabIndex = 36;
this.L_Started.Text = "Game Started:";
this.L_Started.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// CAL_AdventureStartDate
//
this.CAL_AdventureStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.CAL_AdventureStartDate.Location = new System.Drawing.Point(89, 35);
this.CAL_AdventureStartDate.MaxDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0);
this.CAL_AdventureStartDate.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
this.CAL_AdventureStartDate.Name = "CAL_AdventureStartDate";
this.CAL_AdventureStartDate.Size = new System.Drawing.Size(99, 20);
this.CAL_AdventureStartDate.TabIndex = 35;
this.CAL_AdventureStartDate.Value = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
//
// CAL_AdventureStartTime
//
this.CAL_AdventureStartTime.CustomFormat = "hh:mm tt";
this.CAL_AdventureStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.CAL_AdventureStartTime.Location = new System.Drawing.Point(115, 54);
this.CAL_AdventureStartTime.MaxDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0);
this.CAL_AdventureStartTime.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
this.CAL_AdventureStartTime.Name = "CAL_AdventureStartTime";
this.CAL_AdventureStartTime.ShowUpDown = true;
this.CAL_AdventureStartTime.Size = new System.Drawing.Size(73, 20);
this.CAL_AdventureStartTime.TabIndex = 34;
this.CAL_AdventureStartTime.Value = new System.DateTime(2001, 1, 1, 0, 0, 0, 0);
//
// CAL_LastSavedTime
//
this.CAL_LastSavedTime.CustomFormat = "hh:mm tt";
this.CAL_LastSavedTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.CAL_LastSavedTime.Location = new System.Drawing.Point(115, 129);
this.CAL_LastSavedTime.MaxDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0);
this.CAL_LastSavedTime.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
this.CAL_LastSavedTime.Name = "CAL_LastSavedTime";
this.CAL_LastSavedTime.ShowUpDown = true;
this.CAL_LastSavedTime.Size = new System.Drawing.Size(73, 20);
this.CAL_LastSavedTime.TabIndex = 37;
this.CAL_LastSavedTime.Value = new System.DateTime(2001, 1, 1, 0, 0, 0, 0);
//
// Tab_BadgeMap
//
this.Tab_BadgeMap.Controls.Add(this.GB_Map);
@ -2067,51 +2119,38 @@ namespace PKHeX
this.Tab_Appearance.Text = "Appearance";
this.Tab_Appearance.UseVisualStyleBackColor = true;
//
// CAL_AdventureStartTime
// L_Fame
//
this.CAL_AdventureStartTime.CustomFormat = "hh:mm tt";
this.CAL_AdventureStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.CAL_AdventureStartTime.Location = new System.Drawing.Point(116, 70);
this.CAL_AdventureStartTime.MaxDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0);
this.CAL_AdventureStartTime.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
this.CAL_AdventureStartTime.Name = "CAL_AdventureStartTime";
this.CAL_AdventureStartTime.ShowUpDown = true;
this.CAL_AdventureStartTime.Size = new System.Drawing.Size(73, 20);
this.CAL_AdventureStartTime.TabIndex = 34;
this.CAL_AdventureStartTime.Value = new System.DateTime(2001, 1, 1, 0, 0, 0, 0);
this.L_Fame.Location = new System.Drawing.Point(3, 72);
this.L_Fame.Name = "L_Fame";
this.L_Fame.Size = new System.Drawing.Size(80, 20);
this.L_Fame.TabIndex = 40;
this.L_Fame.Text = "HoF Entered:";
this.L_Fame.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// CAL_AdventureStartDate
// CAL_HoFDate
//
this.CAL_AdventureStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.CAL_AdventureStartDate.Location = new System.Drawing.Point(90, 51);
this.CAL_AdventureStartDate.MaxDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0);
this.CAL_AdventureStartDate.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
this.CAL_AdventureStartDate.Name = "CAL_AdventureStartDate";
this.CAL_AdventureStartDate.Size = new System.Drawing.Size(99, 20);
this.CAL_AdventureStartDate.TabIndex = 35;
this.CAL_AdventureStartDate.Value = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
this.CAL_HoFDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.CAL_HoFDate.Location = new System.Drawing.Point(89, 72);
this.CAL_HoFDate.MaxDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0);
this.CAL_HoFDate.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
this.CAL_HoFDate.Name = "CAL_HoFDate";
this.CAL_HoFDate.Size = new System.Drawing.Size(99, 20);
this.CAL_HoFDate.TabIndex = 39;
this.CAL_HoFDate.Value = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
//
// L_Started
// CAL_HoFTime
//
this.L_Started.Location = new System.Drawing.Point(4, 51);
this.L_Started.Name = "L_Started";
this.L_Started.Size = new System.Drawing.Size(80, 20);
this.L_Started.TabIndex = 36;
this.L_Started.Text = "Game Started:";
this.L_Started.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// CAL_LastSavedTime
//
this.CAL_LastSavedTime.CustomFormat = "hh:mm tt";
this.CAL_LastSavedTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.CAL_LastSavedTime.Location = new System.Drawing.Point(116, 126);
this.CAL_LastSavedTime.MaxDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0);
this.CAL_LastSavedTime.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
this.CAL_LastSavedTime.Name = "CAL_LastSavedTime";
this.CAL_LastSavedTime.ShowUpDown = true;
this.CAL_LastSavedTime.Size = new System.Drawing.Size(73, 20);
this.CAL_LastSavedTime.TabIndex = 37;
this.CAL_LastSavedTime.Value = new System.DateTime(2001, 1, 1, 0, 0, 0, 0);
this.CAL_HoFTime.CustomFormat = "hh:mm tt";
this.CAL_HoFTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.CAL_HoFTime.Location = new System.Drawing.Point(115, 91);
this.CAL_HoFTime.MaxDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0);
this.CAL_HoFTime.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
this.CAL_HoFTime.Name = "CAL_HoFTime";
this.CAL_HoFTime.ShowUpDown = true;
this.CAL_HoFTime.Size = new System.Drawing.Size(73, 20);
this.CAL_HoFTime.TabIndex = 38;
this.CAL_HoFTime.Value = new System.DateTime(2001, 1, 1, 0, 0, 0, 0);
//
// SAV_Trainer
//
@ -2338,5 +2377,8 @@ namespace PKHeX
private System.Windows.Forms.DateTimePicker CAL_AdventureStartTime;
private System.Windows.Forms.Label L_Started;
private System.Windows.Forms.DateTimePicker CAL_LastSavedTime;
private System.Windows.Forms.Label L_Fame;
private System.Windows.Forms.DateTimePicker CAL_HoFDate;
private System.Windows.Forms.DateTimePicker CAL_HoFTime;
}
}

View file

@ -454,6 +454,8 @@ namespace PKHeX
CAL_LastSavedTime.Value = new DateTime(2000, 1, 1, SAV.LastSavedHour, SAV.LastSavedMinute, 0);
CAL_AdventureStartDate.Value = new DateTime(2000, 1, 1).AddSeconds(SAV.SecondsToStart);
CAL_AdventureStartTime.Value = new DateTime(2000, 1, 1).AddSeconds(SAV.SecondsToStart % 86400);
CAL_HoFDate.Value = new DateTime(2000, 1, 1).AddSeconds(SAV.SecondsToFame);
CAL_HoFTime.Value = new DateTime(2000, 1, 1).AddSeconds(SAV.SecondsToFame % 86400);
}
private void save()
{
@ -540,6 +542,11 @@ namespace PKHeX
seconds += (int)(CAL_AdventureStartTime.Value - new DateTime(2000, 1, 1)).TotalSeconds;
SAV.SecondsToStart = seconds;
int fame = (int)(CAL_HoFDate.Value - new DateTime(2000, 1, 1)).TotalSeconds;
fame -= fame % 86400;
fame += (int)(CAL_HoFTime.Value - new DateTime(2000, 1, 1)).TotalSeconds;
SAV.SecondsToFame = fame;
SAV.LastSavedYear = CAL_LastSavedDate.Value.Year;
SAV.LastSavedMonth = CAL_LastSavedDate.Value.Month;
SAV.LastSavedDay = CAL_LastSavedDate.Value.Day;

View file

@ -0,0 +1,603 @@
namespace PKHeX
{
partial class SAV_BoxViewer
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAV_BoxViewer));
this.PAN_Box = new System.Windows.Forms.Panel();
this.bpkx30 = new System.Windows.Forms.PictureBox();
this.bpkx29 = new System.Windows.Forms.PictureBox();
this.bpkx28 = new System.Windows.Forms.PictureBox();
this.bpkx27 = new System.Windows.Forms.PictureBox();
this.bpkx26 = new System.Windows.Forms.PictureBox();
this.bpkx25 = new System.Windows.Forms.PictureBox();
this.bpkx24 = new System.Windows.Forms.PictureBox();
this.bpkx23 = new System.Windows.Forms.PictureBox();
this.bpkx22 = new System.Windows.Forms.PictureBox();
this.bpkx21 = new System.Windows.Forms.PictureBox();
this.bpkx20 = new System.Windows.Forms.PictureBox();
this.bpkx19 = new System.Windows.Forms.PictureBox();
this.bpkx18 = new System.Windows.Forms.PictureBox();
this.bpkx17 = new System.Windows.Forms.PictureBox();
this.bpkx16 = new System.Windows.Forms.PictureBox();
this.bpkx15 = new System.Windows.Forms.PictureBox();
this.bpkx14 = new System.Windows.Forms.PictureBox();
this.bpkx13 = new System.Windows.Forms.PictureBox();
this.bpkx12 = new System.Windows.Forms.PictureBox();
this.bpkx11 = new System.Windows.Forms.PictureBox();
this.bpkx10 = new System.Windows.Forms.PictureBox();
this.bpkx9 = new System.Windows.Forms.PictureBox();
this.bpkx8 = new System.Windows.Forms.PictureBox();
this.bpkx7 = new System.Windows.Forms.PictureBox();
this.bpkx6 = new System.Windows.Forms.PictureBox();
this.bpkx5 = new System.Windows.Forms.PictureBox();
this.bpkx4 = new System.Windows.Forms.PictureBox();
this.bpkx3 = new System.Windows.Forms.PictureBox();
this.bpkx2 = new System.Windows.Forms.PictureBox();
this.bpkx1 = new System.Windows.Forms.PictureBox();
this.B_BoxRight = new System.Windows.Forms.Button();
this.B_BoxLeft = new System.Windows.Forms.Button();
this.CB_BoxSelect = new System.Windows.Forms.ComboBox();
this.PB_BoxSwap = new System.Windows.Forms.PictureBox();
this.PAN_Box.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bpkx30)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx29)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx28)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx27)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx26)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx25)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx24)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx23)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx22)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx21)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx20)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx19)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx18)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx17)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx16)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx15)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx14)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx13)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx12)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx11)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx10)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx9)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PB_BoxSwap)).BeginInit();
this.SuspendLayout();
//
// PAN_Box
//
this.PAN_Box.BackgroundImage = global::PKHeX.Properties.Resources.box_wp16xy;
this.PAN_Box.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.PAN_Box.Controls.Add(this.bpkx30);
this.PAN_Box.Controls.Add(this.bpkx29);
this.PAN_Box.Controls.Add(this.bpkx28);
this.PAN_Box.Controls.Add(this.bpkx27);
this.PAN_Box.Controls.Add(this.bpkx26);
this.PAN_Box.Controls.Add(this.bpkx25);
this.PAN_Box.Controls.Add(this.bpkx24);
this.PAN_Box.Controls.Add(this.bpkx23);
this.PAN_Box.Controls.Add(this.bpkx22);
this.PAN_Box.Controls.Add(this.bpkx21);
this.PAN_Box.Controls.Add(this.bpkx20);
this.PAN_Box.Controls.Add(this.bpkx19);
this.PAN_Box.Controls.Add(this.bpkx18);
this.PAN_Box.Controls.Add(this.bpkx17);
this.PAN_Box.Controls.Add(this.bpkx16);
this.PAN_Box.Controls.Add(this.bpkx15);
this.PAN_Box.Controls.Add(this.bpkx14);
this.PAN_Box.Controls.Add(this.bpkx13);
this.PAN_Box.Controls.Add(this.bpkx12);
this.PAN_Box.Controls.Add(this.bpkx11);
this.PAN_Box.Controls.Add(this.bpkx10);
this.PAN_Box.Controls.Add(this.bpkx9);
this.PAN_Box.Controls.Add(this.bpkx8);
this.PAN_Box.Controls.Add(this.bpkx7);
this.PAN_Box.Controls.Add(this.bpkx6);
this.PAN_Box.Controls.Add(this.bpkx5);
this.PAN_Box.Controls.Add(this.bpkx4);
this.PAN_Box.Controls.Add(this.bpkx3);
this.PAN_Box.Controls.Add(this.bpkx2);
this.PAN_Box.Controls.Add(this.bpkx1);
this.PAN_Box.Location = new System.Drawing.Point(17, 37);
this.PAN_Box.Name = "PAN_Box";
this.PAN_Box.Size = new System.Drawing.Size(251, 160);
this.PAN_Box.TabIndex = 66;
//
// bpkx30
//
this.bpkx30.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx30.Location = new System.Drawing.Point(207, 126);
this.bpkx30.Name = "bpkx30";
this.bpkx30.Size = new System.Drawing.Size(42, 32);
this.bpkx30.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx30.TabIndex = 59;
this.bpkx30.TabStop = false;
//
// bpkx29
//
this.bpkx29.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx29.Location = new System.Drawing.Point(166, 126);
this.bpkx29.Name = "bpkx29";
this.bpkx29.Size = new System.Drawing.Size(42, 32);
this.bpkx29.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx29.TabIndex = 58;
this.bpkx29.TabStop = false;
//
// bpkx28
//
this.bpkx28.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx28.Location = new System.Drawing.Point(125, 126);
this.bpkx28.Name = "bpkx28";
this.bpkx28.Size = new System.Drawing.Size(42, 32);
this.bpkx28.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx28.TabIndex = 57;
this.bpkx28.TabStop = false;
//
// bpkx27
//
this.bpkx27.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx27.Location = new System.Drawing.Point(84, 126);
this.bpkx27.Name = "bpkx27";
this.bpkx27.Size = new System.Drawing.Size(42, 32);
this.bpkx27.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx27.TabIndex = 56;
this.bpkx27.TabStop = false;
//
// bpkx26
//
this.bpkx26.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx26.Location = new System.Drawing.Point(43, 126);
this.bpkx26.Name = "bpkx26";
this.bpkx26.Size = new System.Drawing.Size(42, 32);
this.bpkx26.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx26.TabIndex = 55;
this.bpkx26.TabStop = false;
//
// bpkx25
//
this.bpkx25.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx25.Location = new System.Drawing.Point(2, 126);
this.bpkx25.Name = "bpkx25";
this.bpkx25.Size = new System.Drawing.Size(42, 32);
this.bpkx25.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx25.TabIndex = 54;
this.bpkx25.TabStop = false;
//
// bpkx24
//
this.bpkx24.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx24.Location = new System.Drawing.Point(207, 95);
this.bpkx24.Name = "bpkx24";
this.bpkx24.Size = new System.Drawing.Size(42, 32);
this.bpkx24.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx24.TabIndex = 53;
this.bpkx24.TabStop = false;
//
// bpkx23
//
this.bpkx23.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx23.Location = new System.Drawing.Point(166, 95);
this.bpkx23.Name = "bpkx23";
this.bpkx23.Size = new System.Drawing.Size(42, 32);
this.bpkx23.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx23.TabIndex = 52;
this.bpkx23.TabStop = false;
//
// bpkx22
//
this.bpkx22.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx22.Location = new System.Drawing.Point(125, 95);
this.bpkx22.Name = "bpkx22";
this.bpkx22.Size = new System.Drawing.Size(42, 32);
this.bpkx22.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx22.TabIndex = 51;
this.bpkx22.TabStop = false;
//
// bpkx21
//
this.bpkx21.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx21.Location = new System.Drawing.Point(84, 95);
this.bpkx21.Name = "bpkx21";
this.bpkx21.Size = new System.Drawing.Size(42, 32);
this.bpkx21.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx21.TabIndex = 50;
this.bpkx21.TabStop = false;
//
// bpkx20
//
this.bpkx20.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx20.Location = new System.Drawing.Point(43, 95);
this.bpkx20.Name = "bpkx20";
this.bpkx20.Size = new System.Drawing.Size(42, 32);
this.bpkx20.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx20.TabIndex = 49;
this.bpkx20.TabStop = false;
//
// bpkx19
//
this.bpkx19.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx19.Location = new System.Drawing.Point(2, 95);
this.bpkx19.Name = "bpkx19";
this.bpkx19.Size = new System.Drawing.Size(42, 32);
this.bpkx19.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx19.TabIndex = 48;
this.bpkx19.TabStop = false;
//
// bpkx18
//
this.bpkx18.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx18.Location = new System.Drawing.Point(207, 64);
this.bpkx18.Name = "bpkx18";
this.bpkx18.Size = new System.Drawing.Size(42, 32);
this.bpkx18.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx18.TabIndex = 47;
this.bpkx18.TabStop = false;
//
// bpkx17
//
this.bpkx17.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx17.Location = new System.Drawing.Point(166, 64);
this.bpkx17.Name = "bpkx17";
this.bpkx17.Size = new System.Drawing.Size(42, 32);
this.bpkx17.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx17.TabIndex = 46;
this.bpkx17.TabStop = false;
//
// bpkx16
//
this.bpkx16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx16.Location = new System.Drawing.Point(125, 64);
this.bpkx16.Name = "bpkx16";
this.bpkx16.Size = new System.Drawing.Size(42, 32);
this.bpkx16.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx16.TabIndex = 45;
this.bpkx16.TabStop = false;
//
// bpkx15
//
this.bpkx15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx15.Location = new System.Drawing.Point(84, 64);
this.bpkx15.Name = "bpkx15";
this.bpkx15.Size = new System.Drawing.Size(42, 32);
this.bpkx15.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx15.TabIndex = 44;
this.bpkx15.TabStop = false;
//
// bpkx14
//
this.bpkx14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx14.Location = new System.Drawing.Point(43, 64);
this.bpkx14.Name = "bpkx14";
this.bpkx14.Size = new System.Drawing.Size(42, 32);
this.bpkx14.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx14.TabIndex = 43;
this.bpkx14.TabStop = false;
//
// bpkx13
//
this.bpkx13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx13.Location = new System.Drawing.Point(2, 64);
this.bpkx13.Name = "bpkx13";
this.bpkx13.Size = new System.Drawing.Size(42, 32);
this.bpkx13.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx13.TabIndex = 42;
this.bpkx13.TabStop = false;
//
// bpkx12
//
this.bpkx12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx12.Location = new System.Drawing.Point(207, 33);
this.bpkx12.Name = "bpkx12";
this.bpkx12.Size = new System.Drawing.Size(42, 32);
this.bpkx12.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx12.TabIndex = 41;
this.bpkx12.TabStop = false;
//
// bpkx11
//
this.bpkx11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx11.Location = new System.Drawing.Point(166, 33);
this.bpkx11.Name = "bpkx11";
this.bpkx11.Size = new System.Drawing.Size(42, 32);
this.bpkx11.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx11.TabIndex = 40;
this.bpkx11.TabStop = false;
//
// bpkx10
//
this.bpkx10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx10.Location = new System.Drawing.Point(125, 33);
this.bpkx10.Name = "bpkx10";
this.bpkx10.Size = new System.Drawing.Size(42, 32);
this.bpkx10.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx10.TabIndex = 39;
this.bpkx10.TabStop = false;
//
// bpkx9
//
this.bpkx9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx9.Location = new System.Drawing.Point(84, 33);
this.bpkx9.Name = "bpkx9";
this.bpkx9.Size = new System.Drawing.Size(42, 32);
this.bpkx9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx9.TabIndex = 38;
this.bpkx9.TabStop = false;
//
// bpkx8
//
this.bpkx8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx8.Location = new System.Drawing.Point(43, 33);
this.bpkx8.Name = "bpkx8";
this.bpkx8.Size = new System.Drawing.Size(42, 32);
this.bpkx8.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx8.TabIndex = 37;
this.bpkx8.TabStop = false;
//
// bpkx7
//
this.bpkx7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx7.Location = new System.Drawing.Point(2, 33);
this.bpkx7.Name = "bpkx7";
this.bpkx7.Size = new System.Drawing.Size(42, 32);
this.bpkx7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx7.TabIndex = 36;
this.bpkx7.TabStop = false;
//
// bpkx6
//
this.bpkx6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx6.Location = new System.Drawing.Point(207, 2);
this.bpkx6.Name = "bpkx6";
this.bpkx6.Size = new System.Drawing.Size(42, 32);
this.bpkx6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx6.TabIndex = 35;
this.bpkx6.TabStop = false;
//
// bpkx5
//
this.bpkx5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx5.Location = new System.Drawing.Point(166, 2);
this.bpkx5.Name = "bpkx5";
this.bpkx5.Size = new System.Drawing.Size(42, 32);
this.bpkx5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx5.TabIndex = 34;
this.bpkx5.TabStop = false;
//
// bpkx4
//
this.bpkx4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx4.Location = new System.Drawing.Point(125, 2);
this.bpkx4.Name = "bpkx4";
this.bpkx4.Size = new System.Drawing.Size(42, 32);
this.bpkx4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx4.TabIndex = 33;
this.bpkx4.TabStop = false;
//
// bpkx3
//
this.bpkx3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx3.Location = new System.Drawing.Point(84, 2);
this.bpkx3.Name = "bpkx3";
this.bpkx3.Size = new System.Drawing.Size(42, 32);
this.bpkx3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx3.TabIndex = 32;
this.bpkx3.TabStop = false;
//
// bpkx2
//
this.bpkx2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx2.Location = new System.Drawing.Point(43, 2);
this.bpkx2.Name = "bpkx2";
this.bpkx2.Size = new System.Drawing.Size(42, 32);
this.bpkx2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx2.TabIndex = 31;
this.bpkx2.TabStop = false;
//
// bpkx1
//
this.bpkx1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bpkx1.Location = new System.Drawing.Point(2, 2);
this.bpkx1.Name = "bpkx1";
this.bpkx1.Size = new System.Drawing.Size(42, 32);
this.bpkx1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.bpkx1.TabIndex = 30;
this.bpkx1.TabStop = false;
//
// B_BoxRight
//
this.B_BoxRight.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.B_BoxRight.Location = new System.Drawing.Point(210, 11);
this.B_BoxRight.Name = "B_BoxRight";
this.B_BoxRight.Size = new System.Drawing.Size(27, 23);
this.B_BoxRight.TabIndex = 65;
this.B_BoxRight.Text = ">>";
this.B_BoxRight.UseVisualStyleBackColor = true;
this.B_BoxRight.Click += new System.EventHandler(this.clickBoxRight);
//
// B_BoxLeft
//
this.B_BoxLeft.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.B_BoxLeft.Location = new System.Drawing.Point(48, 11);
this.B_BoxLeft.Name = "B_BoxLeft";
this.B_BoxLeft.Size = new System.Drawing.Size(27, 23);
this.B_BoxLeft.TabIndex = 64;
this.B_BoxLeft.Text = "<<";
this.B_BoxLeft.UseVisualStyleBackColor = true;
this.B_BoxLeft.Click += new System.EventHandler(this.clickBoxLeft);
//
// CB_BoxSelect
//
this.CB_BoxSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CB_BoxSelect.FormattingEnabled = true;
this.CB_BoxSelect.Items.AddRange(new object[] {
"Box 1",
"Box 2",
"Box 3",
"Box 4",
"Box 5",
"Box 6",
"Box 7",
"Box 8",
"Box 9",
"Box 10",
"Box 11",
"Box 12",
"Box 13",
"Box 14",
"Box 15",
"Box 16",
"Box 17",
"Box 18",
"Box 19",
"Box 20",
"Box 21",
"Box 22",
"Box 23",
"Box 24",
"Box 25",
"Box 26",
"Box 27",
"Box 28",
"Box 29",
"Box 30",
"Box 31"});
this.CB_BoxSelect.Location = new System.Drawing.Point(79, 12);
this.CB_BoxSelect.Name = "CB_BoxSelect";
this.CB_BoxSelect.Size = new System.Drawing.Size(127, 21);
this.CB_BoxSelect.TabIndex = 63;
this.CB_BoxSelect.SelectedIndexChanged += new System.EventHandler(this.CB_BoxSelect_SelectedIndexChanged);
//
// PB_BoxSwap
//
this.PB_BoxSwap.Image = global::PKHeX.Properties.Resources.swapBox;
this.PB_BoxSwap.Location = new System.Drawing.Point(0, 0);
this.PB_BoxSwap.Name = "PB_BoxSwap";
this.PB_BoxSwap.Size = new System.Drawing.Size(24, 24);
this.PB_BoxSwap.TabIndex = 67;
this.PB_BoxSwap.TabStop = false;
this.PB_BoxSwap.Click += new System.EventHandler(this.PB_BoxSwap_Click);
//
// SAV_BoxViewer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 211);
this.Controls.Add(this.PB_BoxSwap);
this.Controls.Add(this.B_BoxRight);
this.Controls.Add(this.B_BoxLeft);
this.Controls.Add(this.CB_BoxSelect);
this.Controls.Add(this.PAN_Box);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "SAV_BoxViewer";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Box Viewer";
this.PAN_Box.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.bpkx30)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx29)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx28)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx27)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx26)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx25)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx24)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx23)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx22)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx21)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx20)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx19)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx18)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx17)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx16)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx15)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx14)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx13)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx12)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx11)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx10)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx9)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PB_BoxSwap)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel PAN_Box;
private System.Windows.Forms.PictureBox bpkx30;
private System.Windows.Forms.PictureBox bpkx29;
private System.Windows.Forms.PictureBox bpkx28;
private System.Windows.Forms.PictureBox bpkx27;
private System.Windows.Forms.PictureBox bpkx26;
private System.Windows.Forms.PictureBox bpkx25;
private System.Windows.Forms.PictureBox bpkx24;
private System.Windows.Forms.PictureBox bpkx23;
private System.Windows.Forms.PictureBox bpkx22;
private System.Windows.Forms.PictureBox bpkx21;
private System.Windows.Forms.PictureBox bpkx20;
private System.Windows.Forms.PictureBox bpkx19;
private System.Windows.Forms.PictureBox bpkx18;
private System.Windows.Forms.PictureBox bpkx17;
private System.Windows.Forms.PictureBox bpkx16;
private System.Windows.Forms.PictureBox bpkx15;
private System.Windows.Forms.PictureBox bpkx14;
private System.Windows.Forms.PictureBox bpkx13;
private System.Windows.Forms.PictureBox bpkx12;
private System.Windows.Forms.PictureBox bpkx11;
private System.Windows.Forms.PictureBox bpkx10;
private System.Windows.Forms.PictureBox bpkx9;
private System.Windows.Forms.PictureBox bpkx8;
private System.Windows.Forms.PictureBox bpkx7;
private System.Windows.Forms.PictureBox bpkx6;
private System.Windows.Forms.PictureBox bpkx5;
private System.Windows.Forms.PictureBox bpkx4;
private System.Windows.Forms.PictureBox bpkx3;
private System.Windows.Forms.PictureBox bpkx2;
private System.Windows.Forms.PictureBox bpkx1;
private System.Windows.Forms.Button B_BoxRight;
private System.Windows.Forms.Button B_BoxLeft;
private System.Windows.Forms.ComboBox CB_BoxSelect;
private System.Windows.Forms.PictureBox PB_BoxSwap;
}
}

View file

@ -0,0 +1,315 @@
using System;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using static PKHeX.Main;
namespace PKHeX
{
public partial class SAV_BoxViewer : Form
{
public SAV_BoxViewer(Main p)
{
InitializeComponent();
parent = p;
CenterToParent();
AllowDrop = true;
DragEnter += tabMain_DragEnter;
DragDrop += (sender, e) =>
{
Cursor = DefaultCursor;
System.Media.SystemSounds.Asterisk.Play();
};
SlotPictureBoxes = new[] {
bpkx1, bpkx2, bpkx3, bpkx4, bpkx5, bpkx6,
bpkx7, bpkx8, bpkx9, bpkx10,bpkx11,bpkx12,
bpkx13,bpkx14,bpkx15,bpkx16,bpkx17,bpkx18,
bpkx19,bpkx20,bpkx21,bpkx22,bpkx23,bpkx24,
bpkx25,bpkx26,bpkx27,bpkx28,bpkx29,bpkx30,
};
foreach (PictureBox pb in SlotPictureBoxes)
{
pb.AllowDrop = true;
pb.GiveFeedback += (sender, e) => { e.UseDefaultCursors = false; };
pb.MouseUp += pbBoxSlot_MouseUp;
pb.MouseDown += pbBoxSlot_MouseDown;
pb.MouseMove += pbBoxSlot_MouseMove;
pb.DragDrop += pbBoxSlot_DragDrop;
pb.DragEnter += pbBoxSlot_DragEnter;
pb.QueryContinueDrag += pbBoxSlot_QueryContinueDrag;
}
try
{
CB_BoxSelect.Items.Clear();
for (int i = 0; i < SAV.BoxCount; i++)
CB_BoxSelect.Items.Add(SAV.getBoxName(i));
}
catch
{
CB_BoxSelect.Items.Clear();
for (int i = 1; i <= SAV.BoxCount; i++)
CB_BoxSelect.Items.Add($"BOX {i}");
}
CB_BoxSelect.SelectedIndex = 0;
}
private readonly Main parent;
private readonly PictureBox[] SlotPictureBoxes;
private void CB_BoxSelect_SelectedIndexChanged(object sender, EventArgs e)
{
setPKXBoxes();
}
private void clickBoxRight(object sender, EventArgs e)
{
CB_BoxSelect.SelectedIndex = (CB_BoxSelect.SelectedIndex + 1) % SAV.BoxCount;
}
private void clickBoxLeft(object sender, EventArgs e)
{
CB_BoxSelect.SelectedIndex = (CB_BoxSelect.SelectedIndex + SAV.BoxCount - 1) % SAV.BoxCount;
}
private void PB_BoxSwap_Click(object sender, EventArgs e)
{
CB_BoxSelect.SelectedIndex = parent.swapBoxesViewer(CB_BoxSelect.SelectedIndex);
}
// Copied Methods from Main.cs (slightly modified)
private int getPKXOffset(int slot)
{
return SAV.getBoxOffset(CB_BoxSelect.SelectedIndex) + slot * SAV.SIZE_STORED;
}
private void setPKXBoxes()
{
int boxoffset = SAV.getBoxOffset(CB_BoxSelect.SelectedIndex);
int boxbgval = SAV.getBoxWallpaper(CB_BoxSelect.SelectedIndex);
PAN_Box.BackgroundImage = BoxWallpaper.getWallpaper(SAV, boxbgval);
for (int i = 0; i < SlotPictureBoxes.Length; i++)
getSlotFiller(boxoffset + SAV.SIZE_STORED*i, SlotPictureBoxes[i]);
}
private void getSlotFiller(int offset, PictureBox pb)
{
if (SAV.getData(offset, SAV.SIZE_STORED).SequenceEqual(new byte[SAV.SIZE_STORED]))
{
// 00s present in slot.
pb.Image = null;
pb.BackColor = Color.Transparent;
return;
}
PKM p = SAV.getStoredSlot(offset);
if (p.Sanity != 0 || !p.ChecksumValid) // Invalid
{
// Bad Egg present in slot.
pb.Image = null;
pb.BackColor = Color.Red;
return;
}
// Something stored in slot. Only display if species is valid.
pb.Image = p.Species == 0 ? null : p.Sprite;
pb.BackColor = Color.Transparent;
}
private void getQuickFiller(PictureBox pb, PKM pk)
{
pb.Image = pk.Species == 0 ? null : pk.Sprite;
if (pb.BackColor == Color.Red)
pb.BackColor = Color.Transparent;
}
private int getSlot(object sender)
{
sender = ((sender as ToolStripItem)?.Owner as ContextMenuStrip)?.SourceControl ?? sender as PictureBox;
return Array.IndexOf(SlotPictureBoxes, sender);
}
// Drag and drop related functions
private void pbBoxSlot_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
DragInfo.slotLeftMouseIsDown = false;
if (e.Button == MouseButtons.Right)
DragInfo.slotRightMouseIsDown = false;
}
private void pbBoxSlot_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
DragInfo.slotLeftMouseIsDown = true;
if (e.Button == MouseButtons.Right)
DragInfo.slotRightMouseIsDown = true;
}
private void pbBoxSlot_MouseMove(object sender, MouseEventArgs e)
{
if (DragInfo.slotDragDropInProgress)
return;
if (DragInfo.slotLeftMouseIsDown)
{
// The goal is to create a temporary PKX file for the underlying Pokemon
// and use that file to perform a drag drop operation.
// Abort if there is no Pokemon in the given slot.
PictureBox pb = (PictureBox)sender;
if (pb.Image == null)
return;
// Set flag to prevent re-entering.
DragInfo.slotDragDropInProgress = true;
DragInfo.slotSourceSlotNumber = getSlot(pb);
int offset = getPKXOffset(DragInfo.slotSourceSlotNumber);
// Prepare Data
DragInfo.slotPkmSource = SAV.getData(offset, SAV.SIZE_STORED);
DragInfo.slotSourceOffset = offset;
DragInfo.slotSourceBoxNumber = CB_BoxSelect.SelectedIndex;
// Make a new file name based off the PID
byte[] dragdata = SAV.decryptPKM(DragInfo.slotPkmSource);
Array.Resize(ref dragdata, SAV.SIZE_STORED);
PKM pkx = SAV.getPKM(dragdata);
string filename = pkx.FileName;
// Make File
string newfile = Path.Combine(Path.GetTempPath(), Util.CleanFileName(filename));
try
{
File.WriteAllBytes(newfile, dragdata);
var img = (Bitmap)pb.Image;
DragInfo.Cursor = Cursor.Current = new Cursor(img.GetHicon());
pb.Image = null;
pb.BackgroundImage = Properties.Resources.slotDrag;
// Thread Blocks on DoDragDrop
DragInfo.CurrentPath = newfile;
DragDropEffects result = pb.DoDragDrop(new DataObject(DataFormats.FileDrop, new[] { newfile }), DragDropEffects.Move);
if (!DragInfo.SourceValid || result != DragDropEffects.Link) // not dropped to another box slot, restore img
pb.Image = img;
else // refresh image
getQuickFiller(pb, SAV.getStoredSlot(DragInfo.slotSourceOffset));
pb.BackgroundImage = null;
if (DragInfo.slotDestinationBoxNumber == DragInfo.slotSourceBoxNumber)
SlotPictureBoxes[DragInfo.slotDestinationSlotNumber].Image = img;
}
catch (Exception x)
{
Util.Error("Drag & Drop Error:", x.ToString());
}
DragInfo.Reset();
Cursor = DefaultCursor;
// Browser apps need time to load data since the file isn't moved to a location on the user's local storage.
// Tested 10ms -> too quick, 100ms was fine. 500ms should be safe?
new Thread(() =>
{
Thread.Sleep(500);
if (File.Exists(newfile) && DragInfo.CurrentPath == null)
File.Delete(newfile);
}).Start();
}
}
private void pbBoxSlot_DragDrop(object sender, DragEventArgs e)
{
DragInfo.slotDestinationSlotNumber = getSlot(sender);
DragInfo.slotDestinationOffset = getPKXOffset(DragInfo.slotDestinationSlotNumber);
DragInfo.slotDestinationBoxNumber = CB_BoxSelect.SelectedIndex;
// Check for In-Dropped files (PKX,SAV,ETC)
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
if (Directory.Exists(files[0])) { return; }
if (DragInfo.slotSourceOffset < 0) // file
{
if (files.Length <= 0)
return;
string file = files[0];
FileInfo fi = new FileInfo(file);
if (!PKX.getIsPKM(fi.Length) && !MysteryGift.getIsMysteryGift(fi.Length))
{ return; }
byte[] data = File.ReadAllBytes(file);
MysteryGift mg = MysteryGift.getMysteryGift(data, fi.Extension);
PKM temp = mg != null ? mg.convertToPKM(SAV) : PKMConverter.getPKMfromBytes(data);
string c;
PKM pk = PKMConverter.convertToFormat(temp, SAV.Generation, out c);
if (pk == null)
{ Util.Error(c); Console.WriteLine(c); return; }
string[] errata = verifyPKMtoSAV(pk);
if (errata.Length > 0)
{
string concat = string.Join(Environment.NewLine, errata);
if (DialogResult.Yes != Util.Prompt(MessageBoxButtons.YesNo, concat, "Continue?"))
{ Console.WriteLine(c); Console.WriteLine(concat); return; }
}
SAV.setStoredSlot(pk, DragInfo.slotDestinationOffset);
getQuickFiller(SlotPictureBoxes[DragInfo.slotDestinationSlotNumber], pk);
Console.WriteLine(c);
}
else
{
PKM pkz = SAV.getStoredSlot(DragInfo.slotSourceOffset);
if (!DragInfo.SourceValid) { } // not overwritable, do nothing
else if (ModifierKeys == Keys.Alt && DragInfo.DestinationValid) // overwrite
{
// Clear from slot
if (DragInfo.SameBox)
getQuickFiller(SlotPictureBoxes[DragInfo.slotSourceSlotNumber], SAV.BlankPKM); // picturebox
SAV.setStoredSlot(SAV.BlankPKM, DragInfo.slotSourceOffset);
}
else if (ModifierKeys != Keys.Control && DragInfo.DestinationValid) // move
{
// Load data from destination
PKM pk = ((PictureBox)sender).Image != null
? SAV.getStoredSlot(DragInfo.slotDestinationOffset)
: SAV.BlankPKM;
// Set destination pokemon image to source picture box
if (DragInfo.SameBox)
getQuickFiller(SlotPictureBoxes[DragInfo.slotSourceSlotNumber], pk);
// Set destination pokemon data to source slot
SAV.setStoredSlot(pk, DragInfo.slotSourceOffset);
}
else if (DragInfo.SameBox) // clone
getQuickFiller(SlotPictureBoxes[DragInfo.slotSourceSlotNumber], pkz);
// Copy from temp to destination slot.
SAV.setStoredSlot(pkz, DragInfo.slotDestinationOffset);
getQuickFiller(SlotPictureBoxes[DragInfo.slotDestinationSlotNumber], pkz);
e.Effect = DragDropEffects.Link;
Cursor = DefaultCursor;
}
}
private void pbBoxSlot_DragEnter(object sender, DragEventArgs e)
{
if (e.AllowedEffect == (DragDropEffects.Copy | DragDropEffects.Link)) // external file
e.Effect = DragDropEffects.Copy;
else if (e.Data != null) // within
e.Effect = DragDropEffects.Move;
if (DragInfo.slotDragDropInProgress)
Cursor = DragInfo.Cursor;
}
private void pbBoxSlot_QueryContinueDrag(object sender, QueryContinueDragEventArgs e)
{
if (e.Action == DragAction.Cancel || e.Action == DragAction.Drop)
{
DragInfo.slotLeftMouseIsDown = false;
DragInfo.slotRightMouseIsDown = false;
DragInfo.slotDragDropInProgress = false;
}
}
private void tabMain_DragEnter(object sender, DragEventArgs e)
{
if (e.AllowedEffect == (DragDropEffects.Copy | DragDropEffects.Link)) // external file
e.Effect = DragDropEffects.Copy;
else if (e.Data != null) // within
e.Effect = DragDropEffects.Move;
}
}
}

View file

@ -0,0 +1,219 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="PB_BoxSwap.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="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAE
AAAAAAAAAAAAAAAAAAAAAAAAIyMjAQAAAAALCwsPJiYmJysrKycqKionKSkpJykpKScpKSknKioqJyoq
KicrKysnJycnJw0ODQ8AAAAAJiYmAQAAAABpaWlHq6ur17+/v+6+vr7svr6+7b6+vu2+vr7tvr6+7b6+
vu2+vr7tvr6+7L+/v+6rq6vXampqSAAAAAAoKSgXvr++3eLi4v/g4OD94eHh/+Hh4f/i4uL/4uLi/+Li
4v/i4uL/4eHh/+Dh4P/g4OD94uLi/7+/v90sLCwXfn5+PNna2frg4OD/39/f/uHh4f7h4eH+39/f/uDg
4P7g4OD+39/f/uHh4f7h4OH+39/f/t/g3//a2tr6g4ODPoOCgz7X19f64+Pj/+Li4v7k5OT/4+Tj//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ZGc7/GRnO/xkZ
zv8ZGc7/GRnO/xkZzv8YGM3/GBjN/xgYzf8YGM3/GBjN/xgYzP8YGMz/FxfK/yMj0v4zM5WfFBRkBwAA
AAAAAAAAAAAAAAAAAAAAAAAAHBx7Ay0tdkg3N5emMTGpxSwsp8gsLKfILCynyCwsp8gsLKfILCynyCws
p8gsLKfILCynyCwsp8gsLKfILCynyCwsp8gsLKfILCynyCwsp8gsLKfILCynyDExqcU2NpenLi54Shsb
ewMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////8AAAD+AAAAfAAAADwAAAA8AAAAPAAAADwAAAA8AA
AAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AA
AAPAAAADwAAAA8AAAAPAAAAD4AAAB/gAAB//////
</value>
</data>
</root>

View file

@ -171,8 +171,8 @@ namespace PKHeX
};
var mtb = new NumericUpDown
{
Maximum = short.MaxValue,
Minimum = short.MinValue,
Maximum = ushort.MaxValue,
Minimum = ushort.MinValue,
Value = Constants[num[i]],
Name = constTag + num[i].ToString("0000"),
Margin = Padding.Empty,

View file

@ -10,7 +10,19 @@ namespace PKHeX
{
InitializeComponent();
Util.TranslateInterface(this, Main.curlanguage);
itemlist = SAV.Generation == 3 ? Main.g3items : Main.itemlist;
switch (SAV.Generation)
{
case 1:
itemlist = PKX.getG1ItemList();
B_GiveAll.Visible = false; // Can't give all, not enough room
break;
case 3:
itemlist = Main.g3items;
break;
default:
itemlist = Main.itemlist;
break;
}
Pouches = SAV.Inventory;
getBags();
}
@ -155,6 +167,8 @@ namespace PKHeX
itemcnt++; // No 0 count of items
else if (itemcnt > 995)
itemcnt = 995; // cap out
else if (itemcnt > 99 && SAV.Generation < 3)
itemcnt = 99;
if (itemindex == 0) // Compression of Empty Slots
continue;

View file

@ -0,0 +1,179 @@
namespace PKHeX
{
partial class SAV_SimplePokedex
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAV_SimplePokedex));
this.B_Save = new System.Windows.Forms.Button();
this.B_Cancel = new System.Windows.Forms.Button();
this.B_CaughtNone = new System.Windows.Forms.Button();
this.B_CaughtAll = new System.Windows.Forms.Button();
this.B_SeenNone = new System.Windows.Forms.Button();
this.B_SeenAll = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.CLB_Caught = new System.Windows.Forms.CheckedListBox();
this.Label_Seen = new System.Windows.Forms.Label();
this.CLB_Seen = new System.Windows.Forms.CheckedListBox();
this.SuspendLayout();
//
// B_Save
//
this.B_Save.Location = new System.Drawing.Point(146, 301);
this.B_Save.Name = "B_Save";
this.B_Save.Size = new System.Drawing.Size(85, 23);
this.B_Save.TabIndex = 19;
this.B_Save.Text = "Save";
this.B_Save.UseVisualStyleBackColor = true;
this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
//
// B_Cancel
//
this.B_Cancel.Location = new System.Drawing.Point(53, 301);
this.B_Cancel.Name = "B_Cancel";
this.B_Cancel.Size = new System.Drawing.Size(85, 23);
this.B_Cancel.TabIndex = 18;
this.B_Cancel.Text = "Cancel";
this.B_Cancel.UseVisualStyleBackColor = true;
this.B_Cancel.Click += new System.EventHandler(this.B_Cancel_Click);
//
// B_CaughtNone
//
this.B_CaughtNone.Location = new System.Drawing.Point(151, 267);
this.B_CaughtNone.Name = "B_CaughtNone";
this.B_CaughtNone.Size = new System.Drawing.Size(120, 23);
this.B_CaughtNone.TabIndex = 17;
this.B_CaughtNone.Text = "Caught None";
this.B_CaughtNone.UseVisualStyleBackColor = true;
this.B_CaughtNone.Click += new System.EventHandler(this.B_CaughtNone_Click);
//
// B_CaughtAll
//
this.B_CaughtAll.Location = new System.Drawing.Point(151, 238);
this.B_CaughtAll.Name = "B_CaughtAll";
this.B_CaughtAll.Size = new System.Drawing.Size(120, 23);
this.B_CaughtAll.TabIndex = 16;
this.B_CaughtAll.Text = "Caught All";
this.B_CaughtAll.UseVisualStyleBackColor = true;
this.B_CaughtAll.Click += new System.EventHandler(this.B_CaughtAll_Click);
//
// B_SeenNone
//
this.B_SeenNone.Location = new System.Drawing.Point(14, 267);
this.B_SeenNone.Name = "B_SeenNone";
this.B_SeenNone.Size = new System.Drawing.Size(120, 23);
this.B_SeenNone.TabIndex = 15;
this.B_SeenNone.Text = "Seen None";
this.B_SeenNone.UseVisualStyleBackColor = true;
this.B_SeenNone.Click += new System.EventHandler(this.B_SeenNone_Click);
//
// B_SeenAll
//
this.B_SeenAll.Location = new System.Drawing.Point(14, 238);
this.B_SeenAll.Name = "B_SeenAll";
this.B_SeenAll.Size = new System.Drawing.Size(120, 23);
this.B_SeenAll.TabIndex = 14;
this.B_SeenAll.Text = "Seen All";
this.B_SeenAll.UseVisualStyleBackColor = true;
this.B_SeenAll.Click += new System.EventHandler(this.B_SeenAll_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(151, 13);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 13);
this.label2.TabIndex = 13;
this.label2.Text = "Caught:";
//
// CLB_Caught
//
this.CLB_Caught.FormattingEnabled = true;
this.CLB_Caught.Location = new System.Drawing.Point(151, 33);
this.CLB_Caught.Name = "CLB_Caught";
this.CLB_Caught.Size = new System.Drawing.Size(120, 199);
this.CLB_Caught.TabIndex = 12;
this.CLB_Caught.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.CLB_Caught_ItemCheck);
//
// Label_Seen
//
this.Label_Seen.AutoSize = true;
this.Label_Seen.Location = new System.Drawing.Point(14, 13);
this.Label_Seen.Name = "Label_Seen";
this.Label_Seen.Size = new System.Drawing.Size(35, 13);
this.Label_Seen.TabIndex = 11;
this.Label_Seen.Text = "Seen:";
//
// CLB_Seen
//
this.CLB_Seen.FormattingEnabled = true;
this.CLB_Seen.Location = new System.Drawing.Point(14, 33);
this.CLB_Seen.Name = "CLB_Seen";
this.CLB_Seen.Size = new System.Drawing.Size(120, 199);
this.CLB_Seen.TabIndex = 10;
this.CLB_Seen.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.CLB_Seen_ItemCheck);
//
// SAV_SimplePokedex
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 336);
this.Controls.Add(this.B_Save);
this.Controls.Add(this.B_Cancel);
this.Controls.Add(this.B_CaughtNone);
this.Controls.Add(this.B_CaughtAll);
this.Controls.Add(this.B_SeenNone);
this.Controls.Add(this.B_SeenAll);
this.Controls.Add(this.label2);
this.Controls.Add(this.CLB_Caught);
this.Controls.Add(this.Label_Seen);
this.Controls.Add(this.CLB_Seen);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximumSize = new System.Drawing.Size(300, 375);
this.MinimumSize = new System.Drawing.Size(300, 375);
this.Name = "SAV_SimplePokedex";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Pokedex Editor";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button B_Save;
private System.Windows.Forms.Button B_Cancel;
private System.Windows.Forms.Button B_CaughtNone;
private System.Windows.Forms.Button B_CaughtAll;
private System.Windows.Forms.Button B_SeenNone;
private System.Windows.Forms.Button B_SeenAll;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckedListBox CLB_Caught;
private System.Windows.Forms.Label Label_Seen;
private System.Windows.Forms.CheckedListBox CLB_Seen;
}
}

View file

@ -0,0 +1,90 @@
using System;
using System.Windows.Forms;
namespace PKHeX
{
public partial class SAV_SimplePokedex : Form
{
public SAV_SimplePokedex()
{
InitializeComponent();
Util.TranslateInterface(this, Main.curlanguage);
seen = new bool[SAV.MaxSpeciesID];
caught = new bool[SAV.MaxSpeciesID];
string[] spec = Util.getSpeciesList(Main.curlanguage);
for (int i = 0; i < seen.Length; i++)
{
PKM tempPkm = new PK6();
tempPkm.Species = i + 1;
seen[i] = SAV.getSeen(tempPkm);
caught[i] = SAV.getCaught(tempPkm);
CLB_Seen.Items.Add(spec[i + 1]);
CLB_Caught.Items.Add(spec[i + 1]);
CLB_Seen.SetItemChecked(i, seen[i]);
CLB_Caught.SetItemChecked(i, caught[i]);
}
initialized = true;
}
private readonly SaveFile SAV = Main.SAV.Clone();
private readonly bool[] seen;
private readonly bool[] caught;
private readonly bool initialized;
private void B_Save_Click(object sender, EventArgs e)
{
for (int i = 0; i < seen.Length; i++)
{
PKM tempPkm = new PK6();
tempPkm.Species = i + 1;
SAV.setSeen(tempPkm, seen[i]);
SAV.setCaught(tempPkm, caught[i]);
}
SAV.Data.CopyTo(Main.SAV.Data, 0);
Main.SAV.Edited = true;
Close();
}
private void B_Cancel_Click(object sender, EventArgs e)
{
Close();
}
private void B_SeenAll_Click(object sender, EventArgs e)
{
for (int i = 0; i < SAV.MaxSpeciesID; i++)
CLB_Seen.SetItemChecked(i, true);
}
private void B_SeenNone_Click(object sender, EventArgs e)
{
for (int i = 0; i < SAV.MaxSpeciesID; i++)
CLB_Seen.SetItemChecked(i, false);
}
private void B_CaughtAll_Click(object sender, EventArgs e)
{
for (int i = 0; i < SAV.MaxSpeciesID; i++)
CLB_Caught.SetItemChecked(i, true);
}
private void B_CaughtNone_Click(object sender, EventArgs e)
{
for (int i = 0; i < SAV.MaxSpeciesID; i++)
CLB_Caught.SetItemChecked(i, false);
}
private void CLB_Seen_ItemCheck(object sender, ItemCheckEventArgs e)
{
if (!initialized) return;
seen[e.Index] = e.NewValue == CheckState.Checked;
}
private void CLB_Caught_ItemCheck(object sender, ItemCheckEventArgs e)
{
if (!initialized) return;
caught[e.Index] = e.NewValue == CheckState.Checked;
}
}
}

View file

@ -0,0 +1,216 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAE
AAAAAAAAAAAAAAAAAAAAAAAAIyMjAQAAAAALCwsPJiYmJysrKycqKionKSkpJykpKScpKSknKioqJyoq
KicrKysnJycnJw0ODQ8AAAAAJiYmAQAAAABpaWlHq6ur17+/v+6+vr7svr6+7b6+vu2+vr7tvr6+7b6+
vu2+vr7tvr6+7L+/v+6rq6vXampqSAAAAAAoKSgXvr++3eLi4v/g4OD94eHh/+Hh4f/i4uL/4uLi/+Li
4v/i4uL/4eHh/+Dh4P/g4OD94uLi/7+/v90sLCwXfn5+PNna2frg4OD/39/f/uHh4f7h4eH+39/f/uDg
4P7g4OD+39/f/uHh4f7h4OH+39/f/t/g3//a2tr6g4ODPoOCgz7X19f64+Pj/+Li4v7k5OT/4+Tj//Ly
8v/19fX/9PT0//T09P/k5OT/5OTk/+Pj4/7j4+P/19jX+4qLikCDhIM+2tra++Xl5f/k5eT+5OTk//Lz
8v+urq7/RUVF/z4+Pv+Zmpn/8fHx/+Xm5f/k5eT+5eXl/9ra2vyLi4tAhYWFPuXm5vvx8vP/7+/w/v//
//+sra3/AgIC/15eXv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gsLKfILCynyCwsp8gsLKfILCynyCwsp8gsLKfILCynyCwsp8gsLKfILCynyDExqcU2NpenLi54Shsb
ewMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////8AAAD+AAAAfAAAADwAAAA8AAAAPAAAADwAAAA8AA
AAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AA
AAPAAAADwAAAA8AAAAPAAAAD4AAAB/gAAB//////
</value>
</data>
</root>

View file

@ -28,6 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAV_SimpleTrainer));
this.GB_Adventure = new System.Windows.Forms.GroupBox();
this.L_Started = new System.Windows.Forms.Label();
this.CAL_AdventureStartDate = new System.Windows.Forms.DateTimePicker();
@ -63,6 +64,9 @@
this.B_Save = new System.Windows.Forms.Button();
this.B_Cancel = new System.Windows.Forms.Button();
this.GB_Trainer = new System.Windows.Forms.GroupBox();
this.B_MaxCoins = new System.Windows.Forms.Button();
this.L_Coins = new System.Windows.Forms.Label();
this.MT_Coins = new System.Windows.Forms.MaskedTextBox();
this.GB_Badges = new System.Windows.Forms.GroupBox();
this.CHK_H8 = new System.Windows.Forms.CheckBox();
this.CHK_H7 = new System.Windows.Forms.CheckBox();
@ -80,6 +84,14 @@
this.CHK_3 = new System.Windows.Forms.CheckBox();
this.CHK_2 = new System.Windows.Forms.CheckBox();
this.CHK_1 = new System.Windows.Forms.CheckBox();
this.GB_Options = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.CB_SoundType = new System.Windows.Forms.ComboBox();
this.LBL_TextSpeed = new System.Windows.Forms.Label();
this.CB_TextSpeed = new System.Windows.Forms.ComboBox();
this.LBL_BattleStyle = new System.Windows.Forms.Label();
this.CB_BattleStyle = new System.Windows.Forms.ComboBox();
this.CHK_BattleEffects = new System.Windows.Forms.CheckBox();
this.GB_Adventure.SuspendLayout();
this.GB_Map.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NUD_Z)).BeginInit();
@ -88,6 +100,7 @@
((System.ComponentModel.ISupportInitialize)(this.NUD_X)).BeginInit();
this.GB_Trainer.SuspendLayout();
this.GB_Badges.SuspendLayout();
this.GB_Options.SuspendLayout();
this.SuspendLayout();
//
// GB_Adventure
@ -248,7 +261,7 @@
this.CB_Gender.Items.AddRange(new object[] {
"♂",
"♀"});
this.CB_Gender.Location = new System.Drawing.Point(99, 55);
this.CB_Gender.Location = new System.Drawing.Point(119, 55);
this.CB_Gender.Name = "CB_Gender";
this.CB_Gender.Size = new System.Drawing.Size(40, 21);
this.CB_Gender.TabIndex = 68;
@ -458,6 +471,9 @@
//
// GB_Trainer
//
this.GB_Trainer.Controls.Add(this.B_MaxCoins);
this.GB_Trainer.Controls.Add(this.L_Coins);
this.GB_Trainer.Controls.Add(this.MT_Coins);
this.GB_Trainer.Controls.Add(this.TB_OTName);
this.GB_Trainer.Controls.Add(this.B_MaxCash);
this.GB_Trainer.Controls.Add(this.MT_SID);
@ -475,6 +491,37 @@
this.GB_Trainer.TabStop = false;
this.GB_Trainer.Text = "Trainer";
//
// B_MaxCoins
//
this.B_MaxCoins.Location = new System.Drawing.Point(95, 56);
this.B_MaxCoins.Name = "B_MaxCoins";
this.B_MaxCoins.Size = new System.Drawing.Size(20, 20);
this.B_MaxCoins.TabIndex = 71;
this.B_MaxCoins.Text = "+";
this.B_MaxCoins.UseVisualStyleBackColor = true;
this.B_MaxCoins.Visible = false;
//
// L_Coins
//
this.L_Coins.AutoSize = true;
this.L_Coins.Location = new System.Drawing.Point(11, 59);
this.L_Coins.Name = "L_Coins";
this.L_Coins.Size = new System.Drawing.Size(36, 13);
this.L_Coins.TabIndex = 70;
this.L_Coins.Text = "Coins:";
this.L_Coins.Visible = false;
//
// MT_Coins
//
this.MT_Coins.Location = new System.Drawing.Point(53, 55);
this.MT_Coins.Mask = "00000";
this.MT_Coins.Name = "MT_Coins";
this.MT_Coins.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.MT_Coins.Size = new System.Drawing.Size(39, 20);
this.MT_Coins.TabIndex = 69;
this.MT_Coins.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.MT_Coins.Visible = false;
//
// GB_Badges
//
this.GB_Badges.Controls.Add(this.CHK_H8);
@ -660,17 +707,100 @@
this.CHK_1.UseVisualStyleBackColor = true;
this.CHK_1.Visible = false;
//
// GB_Options
//
this.GB_Options.Controls.Add(this.label1);
this.GB_Options.Controls.Add(this.CB_SoundType);
this.GB_Options.Controls.Add(this.LBL_TextSpeed);
this.GB_Options.Controls.Add(this.CB_TextSpeed);
this.GB_Options.Controls.Add(this.LBL_BattleStyle);
this.GB_Options.Controls.Add(this.CB_BattleStyle);
this.GB_Options.Controls.Add(this.CHK_BattleEffects);
this.GB_Options.Location = new System.Drawing.Point(217, 99);
this.GB_Options.Name = "GB_Options";
this.GB_Options.Size = new System.Drawing.Size(157, 125);
this.GB_Options.TabIndex = 72;
this.GB_Options.TabStop = false;
this.GB_Options.Text = "Options";
this.GB_Options.Visible = false;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 71);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(68, 13);
this.label1.TabIndex = 25;
this.label1.Text = "Sound Type:";
//
// CB_SoundType
//
this.CB_SoundType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CB_SoundType.FormattingEnabled = true;
this.CB_SoundType.Location = new System.Drawing.Point(71, 68);
this.CB_SoundType.Name = "CB_SoundType";
this.CB_SoundType.Size = new System.Drawing.Size(80, 21);
this.CB_SoundType.TabIndex = 24;
//
// LBL_TextSpeed
//
this.LBL_TextSpeed.AutoSize = true;
this.LBL_TextSpeed.Location = new System.Drawing.Point(6, 98);
this.LBL_TextSpeed.Name = "LBL_TextSpeed";
this.LBL_TextSpeed.Size = new System.Drawing.Size(65, 13);
this.LBL_TextSpeed.TabIndex = 23;
this.LBL_TextSpeed.Text = "Text Speed:";
//
// CB_TextSpeed
//
this.CB_TextSpeed.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CB_TextSpeed.FormattingEnabled = true;
this.CB_TextSpeed.Location = new System.Drawing.Point(71, 95);
this.CB_TextSpeed.Name = "CB_TextSpeed";
this.CB_TextSpeed.Size = new System.Drawing.Size(80, 21);
this.CB_TextSpeed.TabIndex = 22;
//
// LBL_BattleStyle
//
this.LBL_BattleStyle.AutoSize = true;
this.LBL_BattleStyle.Location = new System.Drawing.Point(8, 44);
this.LBL_BattleStyle.Name = "LBL_BattleStyle";
this.LBL_BattleStyle.Size = new System.Drawing.Size(63, 13);
this.LBL_BattleStyle.TabIndex = 21;
this.LBL_BattleStyle.Text = "Battle Style:";
//
// CB_BattleStyle
//
this.CB_BattleStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CB_BattleStyle.FormattingEnabled = true;
this.CB_BattleStyle.Location = new System.Drawing.Point(71, 41);
this.CB_BattleStyle.Name = "CB_BattleStyle";
this.CB_BattleStyle.Size = new System.Drawing.Size(80, 21);
this.CB_BattleStyle.TabIndex = 20;
//
// CHK_BattleEffects
//
this.CHK_BattleEffects.AutoSize = true;
this.CHK_BattleEffects.Location = new System.Drawing.Point(26, 18);
this.CHK_BattleEffects.Name = "CHK_BattleEffects";
this.CHK_BattleEffects.Size = new System.Drawing.Size(111, 17);
this.CHK_BattleEffects.TabIndex = 19;
this.CHK_BattleEffects.Text = "Use Battle Effects";
this.CHK_BattleEffects.UseVisualStyleBackColor = true;
//
// SAV_SimpleTrainer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(384, 261);
this.Controls.Add(this.GB_Options);
this.Controls.Add(this.GB_Badges);
this.Controls.Add(this.GB_Trainer);
this.Controls.Add(this.B_Save);
this.Controls.Add(this.B_Cancel);
this.Controls.Add(this.GB_Map);
this.Controls.Add(this.GB_Adventure);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MinimumSize = new System.Drawing.Size(400, 300);
this.Name = "SAV_SimpleTrainer";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
@ -686,6 +816,8 @@
this.GB_Trainer.PerformLayout();
this.GB_Badges.ResumeLayout(false);
this.GB_Badges.PerformLayout();
this.GB_Options.ResumeLayout(false);
this.GB_Options.PerformLayout();
this.ResumeLayout(false);
}
@ -744,5 +876,16 @@
private System.Windows.Forms.CheckBox CHK_H3;
private System.Windows.Forms.CheckBox CHK_H2;
private System.Windows.Forms.CheckBox CHK_H1;
private System.Windows.Forms.Button B_MaxCoins;
private System.Windows.Forms.Label L_Coins;
private System.Windows.Forms.MaskedTextBox MT_Coins;
private System.Windows.Forms.GroupBox GB_Options;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox CB_SoundType;
private System.Windows.Forms.Label LBL_TextSpeed;
private System.Windows.Forms.ComboBox CB_TextSpeed;
private System.Windows.Forms.Label LBL_BattleStyle;
private System.Windows.Forms.ComboBox CB_BattleStyle;
private System.Windows.Forms.CheckBox CHK_BattleEffects;
}
}

View file

@ -14,10 +14,15 @@ namespace PKHeX
cba = new[] {CHK_1, CHK_2, CHK_3, CHK_4, CHK_5, CHK_6, CHK_7, CHK_8};
TB_OTName.MaxLength = SAV.OTLength;
B_MaxCash.Click += (sender, e) => MT_Money.Text = "9,999,999";
B_MaxCoins.Click += (sender, e) => MT_Coins.Text = "9999";
CB_Gender.Items.Clear();
CB_Gender.Items.AddRange(Main.gendersymbols.Take(2).ToArray()); // m/f depending on unicode selection
L_SID.Visible = MT_SID.Visible = SAV.Generation > 2;
L_Coins.Visible = B_MaxCoins.Visible = MT_Coins.Visible = SAV.Generation < 3;
CB_Gender.Visible = SAV.Generation > 1;
TB_OTName.Text = SAV.OT;
CB_Gender.SelectedIndex = SAV.Gender;
MT_TID.Text = SAV.TID.ToString("00000");
@ -27,6 +32,29 @@ namespace PKHeX
MT_Minutes.Text = SAV.PlayedMinutes.ToString();
MT_Seconds.Text = SAV.PlayedSeconds.ToString();
int badgeval = 0;
if (SAV is SAV1)
{
SAV1 sav1 = (SAV1)SAV;
MT_Coins.Text = sav1.Coin.ToString();
badgeval = sav1.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", "Earphone2", "Earphone3" });
CB_TextSpeed.Items.AddRange(new[] { "0 (Instant)", "1 (Fast)", "2", "3 (Normal)", "4", "5 (Slow)", "6", "7" });
CHK_BattleEffects.Checked = sav1.BattleEffects;
CB_BattleStyle.SelectedIndex = sav1.BattleStyleSwitch ? 0 : 1;
CB_SoundType.SelectedIndex = sav1.Sound;
CB_TextSpeed.SelectedIndex = sav1.TextSpeed;
}
if (SAV is SAV3)
{
GB_Map.Visible = false;
@ -38,7 +66,6 @@ namespace PKHeX
return;
}
int badgeval = 0;
if (SAV is SAV4)
{
SAV4 s = (SAV4)SAV;
@ -104,6 +131,18 @@ namespace PKHeX
for (int i = 0; i < cba.Length; i++)
badgeval |= (cba[i].Checked ? 1 : 0) << i;
if (SAV is SAV1)
{
SAV1 sav1 = (SAV1) SAV;
sav1.Coin = (ushort) Util.ToUInt32(MT_Coins.Text);
sav1.Badges = badgeval & 0xFF;
sav1.BattleEffects = CHK_BattleEffects.Checked;
sav1.BattleStyleSwitch = CB_BattleStyle.SelectedIndex == 0;
sav1.Sound = CB_SoundType.SelectedIndex;
sav1.TextSpeed = CB_TextSpeed.SelectedIndex;
}
if (SAV is SAV4)
{
SAV4 s = (SAV4)SAV;

View file

@ -117,4 +117,100 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAE
AAAAAAAAAAAAAAAAAAAAAAAAIyMjAQAAAAALCwsPJiYmJysrKycqKionKSkpJykpKScpKSknKioqJyoq
KicrKysnJycnJw0ODQ8AAAAAJiYmAQAAAABpaWlHq6ur17+/v+6+vr7svr6+7b6+vu2+vr7tvr6+7b6+
vu2+vr7tvr6+7L+/v+6rq6vXampqSAAAAAAoKSgXvr++3eLi4v/g4OD94eHh/+Hh4f/i4uL/4uLi/+Li
4v/i4uL/4eHh/+Dh4P/g4OD94uLi/7+/v90sLCwXfn5+PNna2frg4OD/39/f/uHh4f7h4eH+39/f/uDg
4P7g4OD+39/f/uHh4f7h4OH+39/f/t/g3//a2tr6g4ODPoOCgz7X19f64+Pj/+Li4v7k5OT/4+Tj//Ly
8v/19fX/9PT0//T09P/k5OT/5OTk/+Pj4/7j4+P/19jX+4qLikCDhIM+2tra++Xl5f/k5eT+5OTk//Lz
8v+urq7/RUVF/z4+Pv+Zmpn/8fHx/+Xm5f/k5eT+5eXl/9ra2vyLi4tAhYWFPuXm5vvx8vP/7+/w/v//
//+sra3/AgIC/15eXv9tbG3/BQUF/4yMjP//////7+/w/vHy8//l5ub8jY2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yCwsp8gsLKfILCynyDExqcU2NpenLi54Shsb
ewMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////8AAAD+AAAAfAAAADwAAAA8AAAAPAAAADwAAAA8AA
AAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AA
AAPAAAADwAAAA8AAAAPAAAAD4AAAB/gAAB//////
</value>
</data>
</root>

48
PKHeX/Util/ByteUtil.cs Normal file
View file

@ -0,0 +1,48 @@
namespace PKHeX
{
public partial class Util
{
/// <summary>
/// Swaps the Endianness of an int
/// </summary>
/// <param name="val">Value to swap endianness of.</param>
/// <returns>The endianness-swapped value.</returns>
internal static int SwapEndianness(int val)
{
return (int) SwapEndianness((uint) val);
}
/// <summary>
/// Swaps the Endianness of a uint
/// </summary>
/// <param name="val">Value to swap endianness of.</param>
/// <returns>The endianness-swapped value.</returns>
internal static uint SwapEndianness(uint val)
{
return ((val & 0x000000FF) << 24)
| ((val & 0x0000FF00) << 8)
| ((val & 0x00FF0000) >> 8)
| ((val & 0xFF000000) >> 24);
}
/// <summary>
/// Swaps the Endianness of a short
/// </summary>
/// <param name="val">Value to swap endianness of.</param>
/// <returns>The endianness-swapped value.</returns>
internal static int SwapEndianness(short val)
{
return (short)SwapEndianness((ushort)val);
}
/// <summary>
/// Swaps the Endianness of a ushort
/// </summary>
/// <param name="val">Value to swap endianness of.</param>
/// <returns>The endianness-swapped value.</returns>
internal static ushort SwapEndianness(ushort val)
{
return (ushort) (((val & 0x00FF) << 8) | ((val & 0xFF00) >> 8));
}
}
}

View file

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PKHeX
{

41
PKHeX/Util/NetUtil.cs Normal file
View file

@ -0,0 +1,41 @@
using System;
using System.Drawing;
using System.IO;
using System.Net;
namespace PKHeX
{
public partial class Util
{
public static string getStringFromURL(string webURL)
{
try
{
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(webURL);
HttpWebResponse httpWebReponse = (HttpWebResponse)httpWebRequest.GetResponse();
var reader = new StreamReader(httpWebReponse.GetResponseStream());
return reader.ReadToEnd();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return null;
}
}
public static Image getImageFromURL(string webURL)
{
try
{
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(webURL);
HttpWebResponse httpWebReponse = (HttpWebResponse)httpWebRequest.GetResponse();
Stream stream = httpWebReponse.GetResponseStream();
return stream != null ? Image.FromStream(stream) : null;
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return null;
}
}
}
}