Merge pull request #4 from kwsch/master

Update from upstream repo kwsch/PKHeX
This commit is contained in:
ReignOfComputer 2017-01-31 15:39:42 +08:00 committed by GitHub
commit c58c5ff904
23 changed files with 258 additions and 88 deletions

View file

@ -1,12 +1,9 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<configuration> <configuration>
<configSections> <configSections>
<sectionGroup name="applicationSettings" <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="PKHeX.WinForms.Properties.Settings" <section name="PKHeX.WinForms.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false" />
</sectionGroup> </sectionGroup>
</configSections> </configSections>
</configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>

View file

@ -432,18 +432,15 @@ namespace PKHeX.WinForms
private void mainMenuUnicode(object sender, EventArgs e) private void mainMenuUnicode(object sender, EventArgs e)
{ {
Properties.Settings.Default.Unicode = unicode = Menu_Unicode.Checked; Properties.Settings.Default.Unicode = unicode = Menu_Unicode.Checked;
Properties.Settings.Default.Save();
updateUnicode(); updateUnicode();
} }
private void mainMenuModifyDex(object sender, EventArgs e) private void mainMenuModifyDex(object sender, EventArgs e)
{ {
Properties.Settings.Default.SetUpdateDex = SaveFile.SetUpdateDex = Menu_ModifyDex.Checked; Properties.Settings.Default.SetUpdateDex = SaveFile.SetUpdateDex = Menu_ModifyDex.Checked;
Properties.Settings.Default.Save();
} }
private void mainMenuModifyPKM(object sender, EventArgs e) private void mainMenuModifyPKM(object sender, EventArgs e)
{ {
Properties.Settings.Default.SetUpdatePKM = SaveFile.SetUpdatePKM = Menu_ModifyPKM.Checked; Properties.Settings.Default.SetUpdatePKM = SaveFile.SetUpdatePKM = Menu_ModifyPKM.Checked;
Properties.Settings.Default.Save();
} }
private void mainMenuBoxLoad(object sender, EventArgs e) private void mainMenuBoxLoad(object sender, EventArgs e)
{ {
@ -1312,7 +1309,6 @@ namespace PKHeX.WinForms
// Set the culture (makes it easy to pass language to other forms) // Set the culture (makes it easy to pass language to other forms)
Properties.Settings.Default.Language = curlanguage; Properties.Settings.Default.Language = curlanguage;
Properties.Settings.Default.Save();
Thread.CurrentThread.CurrentCulture = new CultureInfo(curlanguage.Substring(0, 2)); Thread.CurrentThread.CurrentCulture = new CultureInfo(curlanguage.Substring(0, 2));
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture; Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
} }
@ -3134,7 +3130,10 @@ namespace PKHeX.WinForms
if (!SAV.Edited) if (!SAV.Edited)
return; return;
if (DialogResult.Yes != WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Any unsaved changes will be lost.", "Are you sure you want to close PKHeX?")) if (DialogResult.Yes != WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Any unsaved changes will be lost.", "Are you sure you want to close PKHeX?"))
e.Cancel = true; { e.Cancel = true; return; }
try { Properties.Settings.Default.Save(); }
catch (Exception x) { File.WriteAllLines("config error.txt", new[] {x.ToString()}); }
} }
#endregion #endregion

View file

@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PKHeX.WinForms</RootNamespace> <RootNamespace>PKHeX.WinForms</RootNamespace>
<AssemblyName>PKHeX</AssemblyName> <AssemblyName>PKHeX</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
@ -41,6 +41,7 @@
<UseVSHostingProcess>false</UseVSHostingProcess> <UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@ -50,6 +51,7 @@
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono-Debug|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono-Debug|x86'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -60,6 +62,7 @@
<UseVSHostingProcess>false</UseVSHostingProcess> <UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono-Release|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono-Release|x86'">
<OutputPath>bin\Mono-Release\</OutputPath> <OutputPath>bin\Mono-Release\</OutputPath>
@ -69,6 +72,7 @@
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />

View file

@ -1,5 +1,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Reflection;
using System.Threading; using System.Threading;
using System.Windows.Forms; using System.Windows.Forms;
@ -28,13 +29,24 @@ namespace PKHeX.WinForms
{ {
StartPKHeX(); StartPKHeX();
} }
catch (FileNotFoundException) catch (FileNotFoundException ex)
{ {
// Check whether or not the exception was from missing PKHeX.Core, rather than something else in the constructor of Main
if (ex.TargetSite == typeof(Program).GetMethod(nameof(StartPKHeX), BindingFlags.Static | BindingFlags.NonPublic))
{
// Exception came from StartPKHeX and (probably) corresponds to missing PKHeX.Core
MessageBox.Show("Could not locate PKHeX.Core.dll. Make sure you're running PKHeX together with its code library. Usually caused when all files are not extracted.", "PKHeX Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); MessageBox.Show("Could not locate PKHeX.Core.dll. Make sure you're running PKHeX together with its code library. Usually caused when all files are not extracted.", "PKHeX Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
return;
}
else
{
// Exception came from Main
throw;
}
} }
} }
static void StartPKHeX() private static void StartPKHeX()
{ {
// Run the application // Run the application
Application.EnableVisualStyles(); Application.EnableVisualStyles();

View file

@ -8,7 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace PKHeX.WinForms.WinForms.Properties { namespace PKHeX.WinForms.Properties {
using System; using System;

View file

@ -170,6 +170,7 @@ namespace PKHeX.WinForms
this.NUD_ThumbsTotal = new System.Windows.Forms.NumericUpDown(); this.NUD_ThumbsTotal = new System.Windows.Forms.NumericUpDown();
this.L_ThumbsTotal = new System.Windows.Forms.Label(); this.L_ThumbsTotal = new System.Windows.Forms.Label();
this.B_Fashion = new System.Windows.Forms.Button(); this.B_Fashion = new System.Windows.Forms.Button();
this.CB_Fashion = new System.Windows.Forms.ComboBox();
this.TC_Editor.SuspendLayout(); this.TC_Editor.SuspendLayout();
this.Tab_Overview.SuspendLayout(); this.Tab_Overview.SuspendLayout();
this.GB_Stats.SuspendLayout(); this.GB_Stats.SuspendLayout();
@ -1548,6 +1549,7 @@ namespace PKHeX.WinForms
// //
// Tab_Misc // Tab_Misc
// //
this.Tab_Misc.Controls.Add(this.CB_Fashion);
this.Tab_Misc.Controls.Add(this.L_SkinColor); this.Tab_Misc.Controls.Add(this.L_SkinColor);
this.Tab_Misc.Controls.Add(this.CB_SkinColor); this.Tab_Misc.Controls.Add(this.CB_SkinColor);
this.Tab_Misc.Controls.Add(this.GB_PokeFinder); this.Tab_Misc.Controls.Add(this.GB_PokeFinder);
@ -1717,6 +1719,19 @@ namespace PKHeX.WinForms
this.B_Fashion.UseVisualStyleBackColor = true; this.B_Fashion.UseVisualStyleBackColor = true;
this.B_Fashion.Click += new System.EventHandler(this.B_Fashion_Click); this.B_Fashion.Click += new System.EventHandler(this.B_Fashion_Click);
// //
// CB_Fashion
//
this.CB_Fashion.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CB_Fashion.FormattingEnabled = true;
this.CB_Fashion.Items.AddRange(new object[] {
"New Game",
"All Legal",
"Everything"});
this.CB_Fashion.Location = new System.Drawing.Point(31, 76);
this.CB_Fashion.Name = "CB_Fashion";
this.CB_Fashion.Size = new System.Drawing.Size(107, 21);
this.CB_Fashion.TabIndex = 60;
//
// SAV_Trainer7 // SAV_Trainer7
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1915,5 +1930,6 @@ namespace PKHeX.WinForms
private System.Windows.Forms.NumericUpDown NUD_Stat; private System.Windows.Forms.NumericUpDown NUD_Stat;
private System.Windows.Forms.Label L_Value; private System.Windows.Forms.Label L_Value;
private System.Windows.Forms.Label L_Offset; private System.Windows.Forms.Label L_Offset;
private System.Windows.Forms.ComboBox CB_Fashion;
} }
} }

View file

@ -36,6 +36,7 @@ namespace PKHeX.WinForms
CB_Stats.Items.Add(name); CB_Stats.Items.Add(name);
} }
CB_Stats.SelectedIndex = RecordList.First().Key; CB_Stats.SelectedIndex = RecordList.First().Key;
CB_Fashion.SelectedIndex = 1;
Loading = false; Loading = false;
} }
@ -321,15 +322,51 @@ namespace PKHeX.WinForms
} }
private void B_Fashion_Click(object sender, EventArgs e) private void B_Fashion_Click(object sender, EventArgs e)
{ {
var prompt = WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Giving all Fashion Items will clear existing data", "Continue?"); var prompt = WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Modifying Fashion Items will clear existing data", "Continue?");
if (DialogResult.Yes != prompt) if (DialogResult.Yes != prompt)
return; return;
// Clear Block // Clear Block
new byte[SAV.FashionLength].CopyTo(SAV.Data, SAV.Fashion); new byte[SAV.FashionLength].CopyTo(SAV.Data, SAV.Fashion);
// Write Payload // Write Payload
byte[] data = SAV.Gender == 0 ? Core.Properties.Resources.fashion_m_sm : Core.Properties.Resources.fashion_f_sm;
data.CopyTo(SAV.Data, SAV.Fashion); switch (CB_Fashion.SelectedIndex)
{
case 0: // Base Fashion
if (SAV.Gender == 0) // Male
{
SAV.Data[0x42000] = 3;
SAV.Data[0x420FB] = 3;
SAV.Data[0x42124] = 3;
SAV.Data[0x4228F] = 3;
SAV.Data[0x423B4] = 3;
SAV.Data[0x42452] = 3;
SAV.Data[0x42517] = 3;
}
else // Female
{
SAV.Data[0x42000] = 3;
SAV.Data[0x42100] = 3;
SAV.Data[0x42223] = 3;
SAV.Data[0x42288] = 3;
SAV.Data[0x423B4] = 3;
SAV.Data[0x42452] = 3;
SAV.Data[0x42517] = 3;
}
break;
case 1: // Full Legal
byte[] data1 = SAV.Gender == 0 ? Core.Properties.Resources.fashion_m_sm : Core.Properties.Resources.fashion_f_sm;
data1.CopyTo(SAV.Data, SAV.Fashion);
break;
case 2: // Everything
byte[] data2 = SAV.Gender == 0 ? Core.Properties.Resources.fashion_m_sm_illegal : Core.Properties.Resources.fashion_f_sm_illegal;
data2.CopyTo(SAV.Data, SAV.Fashion);
break;
default:
return;
}
System.Media.SystemSounds.Asterisk.Play();
} }
private void changeStat(object sender, EventArgs e) private void changeStat(object sender, EventArgs e)
{ {
@ -351,9 +388,13 @@ namespace PKHeX.WinForms
private readonly Dictionary<int, string> RecordList = new Dictionary<int, string> private readonly Dictionary<int, string> RecordList = new Dictionary<int, string>
{ {
{000, "Steps Taken"},
{001, "Times Saved"},
{004, "Wild Pokémon Battles"}, {004, "Wild Pokémon Battles"},
{006, "Pokemon Caught"}, {006, "Pokemon Caught"},
{006, "Pokemon Caught Fishing"},
{008, "Eggs Hatched"}, {008, "Eggs Hatched"},
{009, "Pokemon Evolved"},
{011, "Link Trades"}, {011, "Link Trades"},
{012, "Link Battles"}, {012, "Link Battles"},
{013, "Link Battle Wins"}, {013, "Link Battle Wins"},
@ -381,6 +422,7 @@ namespace PKHeX.WinForms
{112, "Pokemon Caught"}, {112, "Pokemon Caught"},
{114, "Trainers Battled"}, {114, "Trainers Battled"},
{116, "Pokemon Evolved"}, {116, "Pokemon Evolved"},
{118, "Fossils Restored"},
{119, "Photos Taken"}, {119, "Photos Taken"},
{123, "Loto-ID Wins"}, {123, "Loto-ID Wins"},
{124, "PP Raised"}, {124, "PP Raised"},
@ -389,6 +431,8 @@ namespace PKHeX.WinForms
{129, "Facilities Hosted"}, {129, "Facilities Hosted"},
{130, "QR Code Scans"}, {130, "QR Code Scans"},
{158, "Outfit Changes"}, {158, "Outfit Changes"},
{161, "Pelago Training Sessions"},
{162, "Pelago Hot Spring Sessions"},
{166, "Island Scans"}, {166, "Island Scans"},
}; };
} }

View file

@ -335,10 +335,13 @@ namespace PKHeX.Core
if (tr.Length > (lang == 2 ? 7 : 5)) if (tr.Length > (lang == 2 ? 7 : 5))
AddLine(Severity.Invalid, "OT Name too long.", CheckIdentifier.Trainer); AddLine(Severity.Invalid, "OT Name too long.", CheckIdentifier.Trainer);
if (pkm.Species == 151 && tr != "GF") if (pkm.Species == 151)
{
if (tr != "GF" && tr != "ゲーフリ") // if there are more events with special OTs, may be worth refactoring
AddLine(Severity.Invalid, "Incorrect event OT Name.", CheckIdentifier.Trainer); AddLine(Severity.Invalid, "Incorrect event OT Name.", CheckIdentifier.Trainer);
} }
} }
}
private void verifyHyperTraining() private void verifyHyperTraining()
{ {
@ -1075,15 +1078,9 @@ namespace PKHeX.Core
if (Lineage.Any(e => Legal.Inherit_Dream.Contains(e))) if (Lineage.Any(e => Legal.Inherit_Dream.Contains(e)))
AddLine(Severity.Valid, "Dream Ball inheritance possible from Female species.", CheckIdentifier.Ball); AddLine(Severity.Valid, "Dream Ball inheritance possible from Female species.", CheckIdentifier.Ball);
else if (Lineage.Any(e => Legal.Inherit_DreamMale.Contains(e))) else if (Lineage.Any(e => Legal.Inherit_DreamMale.Contains(e)))
{
if (pkm.AbilityNumber != 4)
AddLine(Severity.Valid, "Dream Ball inheritance possible from Male/Genderless species.", CheckIdentifier.Ball); AddLine(Severity.Valid, "Dream Ball inheritance possible from Male/Genderless species.", CheckIdentifier.Ball);
else else
AddLine(Severity.Invalid, "Dream Ball not possible for species.", CheckIdentifier.Ball); AddLine(Severity.Invalid, "Dream Ball not possible for species.", CheckIdentifier.Ball);
}
else
AddLine(Severity.Invalid, "Dream Ball not possible for species.", CheckIdentifier.Ball);
return; return;
} }
@ -1198,8 +1195,8 @@ namespace PKHeX.Core
if (pkm.CurrentHandler != 1) if (pkm.CurrentHandler != 1)
return new CheckResult(Severity.Invalid, "Current handler should not be Event OT.", CheckIdentifier.History); return new CheckResult(Severity.Invalid, "Current handler should not be Event OT.", CheckIdentifier.History);
} }
if (pkm.Format >= 7)
{ // Geolocations
var geo = new[] var geo = new[]
{ {
pkm.Geo1_Country, pkm.Geo2_Country, pkm.Geo3_Country, pkm.Geo4_Country, pkm.Geo5_Country, pkm.Geo1_Country, pkm.Geo2_Country, pkm.Geo3_Country, pkm.Geo4_Country, pkm.Geo5_Country,
@ -1219,8 +1216,9 @@ namespace PKHeX.Core
return new CheckResult(Severity.Invalid, "Geolocation Region without Country.", CheckIdentifier.History); return new CheckResult(Severity.Invalid, "Geolocation Region without Country.", CheckIdentifier.History);
geoEnd = true; geoEnd = true;
} }
if (pkm.Format >= 7)
if (pkm.VC1 || pkm.GenNumber < 7) {
if (pkm.VC1)
{ {
var hasGeo = geo.Any(d => d != 0); var hasGeo = geo.Any(d => d != 0);
@ -1229,7 +1227,7 @@ namespace PKHeX.Core
} }
if (pkm.GenNumber >= 7 && pkm.CNTs.Any(stat => stat > 0)) if (pkm.GenNumber >= 7 && pkm.CNTs.Any(stat => stat > 0))
return new CheckResult(Severity.Invalid, "Untraded -- Contest stats on SM origin should be zero.", CheckIdentifier.History); return new CheckResult(Severity.Invalid, "Contest stats on SM origin should be zero.", CheckIdentifier.History);
if (!pkm.WasEvent && pkm.HT_Name.Length == 0) // Is not Traded if (!pkm.WasEvent && pkm.HT_Name.Length == 0) // Is not Traded
{ {

View file

@ -989,7 +989,7 @@ namespace PKHeX.Core
case 7: // entries per form if required case 7: // entries per form if required
var entry = EggMovesSM[species]; var entry = EggMovesSM[species];
if (formnum > 0 && ((PersonalInfoSM)PersonalTable.SM[species]).FormVariantEggMoves) if (formnum > 0 && AlolanOriginForms.Contains(species))
entry = EggMovesSM[entry.FormTableIndex + formnum - 1]; entry = EggMovesSM[entry.FormTableIndex + formnum - 1];
return entry.Moves; return entry.Moves;

View file

@ -634,7 +634,7 @@ namespace PKHeX.Core
}; };
internal static readonly int[] Inherit_Dream = internal static readonly int[] Inherit_Dream =
{ {
012, 015, 016, 019, 021, 023, 027, 029, 037, 041, 043, 046, 048, 050, 052, 054, 056, 058, 060, 063, 066, 069, 010, 013, 016, 019, 021, 023, 027, 029, 037, 041, 043, 046, 048, 050, 052, 054, 056, 058, 060, 063, 066, 069,
072, 074, 077, 079, 083, 084, 086, 088, 090, 092, 095, 096, 098, 102, 104, 108, 109, 111, 113, 114, 115, 116, 072, 074, 077, 079, 083, 084, 086, 088, 090, 092, 095, 096, 098, 102, 104, 108, 109, 111, 113, 114, 115, 116,
118, 122, 123, 127, 129, 131, 133, 138, 140, 142, 143, 147, 161, 163, 165, 167, 170, 173, 174, 175, 177, 179, 118, 122, 123, 127, 129, 131, 133, 138, 140, 142, 143, 147, 161, 163, 165, 167, 170, 173, 174, 175, 177, 179,
183, 185, 187, 190, 191, 193, 194, 198, 200, 202, 203, 204, 206, 207, 209, 211, 213, 214, 215, 216, 218, 220, 183, 185, 187, 190, 191, 193, 194, 198, 200, 202, 203, 204, 206, 207, 209, 211, 213, 214, 215, 216, 218, 220,

View file

@ -350,7 +350,7 @@ namespace PKHeX.Core
pk.MetDate = Date ?? DateTime.Now; pk.MetDate = Date ?? DateTime.Now;
if (SAV.Generation > 6) // Gen7 if (SAV.Generation > 6 && OriginGame == 0) // Gen7
{ {
pk.Version = (int)GameVersion.OR; pk.Version = (int)GameVersion.OR;
} }

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PKHeX.Core</RootNamespace> <RootNamespace>PKHeX.Core</RootNamespace>
<AssemblyName>PKHeX.Core</AssemblyName> <AssemblyName>PKHeX.Core</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
@ -46,6 +46,7 @@
<Variable name="MONO_WINFORMS_XIM_STYLE" value="disabled" /> <Variable name="MONO_WINFORMS_XIM_STYLE" value="disabled" />
</EnvironmentVariables> </EnvironmentVariables>
</EnvironmentVariables> </EnvironmentVariables>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Mono-Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Mono-Release|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@ -62,6 +63,7 @@
<Variable name="MONO_WINFORMS_XIM_STYLE" value="disabled" /> <Variable name="MONO_WINFORMS_XIM_STYLE" value="disabled" />
</EnvironmentVariables> </EnvironmentVariables>
</EnvironmentVariables> </EnvironmentVariables>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>Resources\icon.ico</ApplicationIcon> <ApplicationIcon>Resources\icon.ico</ApplicationIcon>
@ -80,6 +82,7 @@
<LangVersion>6</LangVersion> <LangVersion>6</LangVersion>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DefineConstants>CLICKONCE;WINDOWS</DefineConstants> <DefineConstants>CLICKONCE;WINDOWS</DefineConstants>
@ -92,6 +95,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RegisterForComInterop>false</RegisterForComInterop> <RegisterForComInterop>false</RegisterForComInterop>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
@ -219,7 +223,9 @@
<None Include="Resources\byte\encounter_sn_sos.pkl" /> <None Include="Resources\byte\encounter_sn_sos.pkl" />
<None Include="Resources\byte\evos_sm.pkl" /> <None Include="Resources\byte\evos_sm.pkl" />
<None Include="Resources\byte\fashion_f_sm" /> <None Include="Resources\byte\fashion_f_sm" />
<None Include="Resources\byte\fashion_f_sm_illegal" />
<None Include="Resources\byte\fashion_m_sm" /> <None Include="Resources\byte\fashion_m_sm" />
<None Include="Resources\byte\fashion_m_sm_illegal" />
<None Include="Resources\byte\lvlmove_sm.pkl" /> <None Include="Resources\byte\lvlmove_sm.pkl" />
<None Include="Resources\byte\personal_sm" /> <None Include="Resources\byte\personal_sm" />
<None Include="Resources\byte\wc7.pkl" /> <None Include="Resources\byte\wc7.pkl" />

View file

@ -545,11 +545,7 @@ namespace PKHeX.Core
if (GenNumber < 7) // must be transferred via bank, and must have memories if (GenNumber < 7) // must be transferred via bank, and must have memories
{ {
TradeMemory(Bank: true); TradeMemory(Bank: true);
if (Geo1_Country == 0) // georegions cleared on 6->7, no need to set
{
Geo1_Country = Country;
Geo1_Region = Region;
}
} }
} }

View file

@ -25,6 +25,6 @@ namespace PKHeX.Core
public int SpecialZ_Item { get { return BitConverter.ToUInt16(Data, 0x4C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x4C); } } public int SpecialZ_Item { get { return BitConverter.ToUInt16(Data, 0x4C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x4C); } }
public int SpecialZ_BaseMove { get { return BitConverter.ToUInt16(Data, 0x4E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x4E); } } public int SpecialZ_BaseMove { get { return BitConverter.ToUInt16(Data, 0x4E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x4E); } }
public int SpecialZ_ZMove { get { return BitConverter.ToUInt16(Data, 0x50); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x50); } } public int SpecialZ_ZMove { get { return BitConverter.ToUInt16(Data, 0x50); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x50); } }
public bool FormVariantEggMoves { get { return Data[0x52] == 1; } set { Data[0x52] = (byte)(value ? 1 : 0); } } public bool LocalVariant { get { return Data[0x52] == 1; } set { Data[0x52] = (byte)(value ? 1 : 0); } }
} }
} }

View file

@ -12324,14 +12324,12 @@ namespace PKHeX.Core.Properties {
/// Looks up a localized string similar to PKHeX - By Kaphotics /// Looks up a localized string similar to PKHeX - By Kaphotics
///http://projectpokemon.org/pkhex ///http://projectpokemon.org/pkhex
/// ///
///16/12/31 - New Update: ///17/01/30 - New Update:
/// - Legality: Added Poké Pelago encounter cases. /// - Added: Control right-clicking a PKM slot (box, party, etc) now allows direct legality checking.
/// - Added: Battle Box slot indication separated for locked &amp; unlocked slots. Locked slots remain un-editable. /// - Added: 6/7 detection preferential treatment &amp; other detection methods. Thanks sora10pls!
/// - Added: Record (trainer stat) editing (captured, battles, exp collected, etc) for Gen7. /// - Added: Remove All medals button now clears Unlocked/Complete flags even if not visible.
/// - Added: Starter Choice Event Constant editing. /// - Fixed: Badly constructed ShowdownSets throw less exceptions (hopefully none). Thanks Sonic Blader!
/// - Added: Relearn move suggestions for static encounters with relearn moves. /// - Fixed: Cloning to all slots in a Gen1/2 [rest of string was truncated]&quot;;.
/// - Added: Option to set NEW flag when giving items.
/// [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
public static string changelog { public static string changelog {
get { get {
@ -12581,6 +12579,16 @@ namespace PKHeX.Core.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] fashion_f_sm_illegal {
get {
object obj = ResourceManager.GetObject("fashion_f_sm_illegal", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Byte[]. /// Looks up a localized resource of type System.Byte[].
/// </summary> /// </summary>
@ -12591,6 +12599,16 @@ namespace PKHeX.Core.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] fashion_m_sm_illegal {
get {
object obj = ResourceManager.GetObject("fashion_m_sm_illegal", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to 0648 (OR) Groudon Defeated /// Looks up a localized string similar to 0648 (OR) Groudon Defeated
///2839 (OR) Groudon Captured ///2839 (OR) Groudon Captured
@ -17974,7 +17992,7 @@ namespace PKHeX.Core.Properties {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to 20161231. /// Looks up a localized string similar to 20170130.
/// </summary> /// </summary>
public static string ProgramVersion { public static string ProgramVersion {
get { get {
@ -26660,7 +26678,14 @@ namespace PKHeX.Core.Properties {
/// ///
/// ///
///Sonne ///Sonne
///Mond. ///Mond
///
///
///Go
///Rote
///Blaue
///Grüne
///Gelbe.
/// </summary> /// </summary>
public static string text_games_de { public static string text_games_de {
get { get {
@ -26700,7 +26725,14 @@ namespace PKHeX.Core.Properties {
/// ///
/// ///
///Sun ///Sun
///Moon. ///Moon
///
///
///Go
///Red
///Blue
///Green
///Yellow.
/// </summary> /// </summary>
public static string text_games_en { public static string text_games_en {
get { get {
@ -26740,7 +26772,14 @@ namespace PKHeX.Core.Properties {
/// ///
/// ///
///Sol ///Sol
///Luna. ///Luna
///
///
///Go
///Roja
///Azul
///Verde
///Amarilla.
/// </summary> /// </summary>
public static string text_games_es { public static string text_games_es {
get { get {
@ -26780,7 +26819,14 @@ namespace PKHeX.Core.Properties {
/// ///
/// ///
///Soleil ///Soleil
///Lune. ///Lune
///
///
///Go
///Rouge
///Bleue
///Vert
///Jaune.
/// </summary> /// </summary>
public static string text_games_fr { public static string text_games_fr {
get { get {
@ -26820,7 +26866,14 @@ namespace PKHeX.Core.Properties {
/// ///
/// ///
///Sole ///Sole
///Luna. ///Luna
///
///
///Go
///Rossa
///Blu
///Verde
///Gialla.
/// </summary> /// </summary>
public static string text_games_it { public static string text_games_it {
get { get {
@ -26860,7 +26913,14 @@ namespace PKHeX.Core.Properties {
/// ///
/// ///
///サン ///サン
///ムーン. ///ムーン
///
///
///Go
///赤
///青
///緑
///黄.
/// </summary> /// </summary>
public static string text_games_ja { public static string text_games_ja {
get { get {
@ -26884,7 +26944,7 @@ namespace PKHeX.Core.Properties {
///Pt기라티나 ///Pt기라티나
/// ///
/// ///
///세움/XD ///콜로세움/XD
/// ///
/// ///
/// ///
@ -26900,7 +26960,14 @@ namespace PKHeX.Core.Properties {
/// ///
/// ///
///썬 ///썬
///문. ///문
///
///
///고
///레드
///블루
///그린
///옐로.
/// </summary> /// </summary>
public static string text_games_ko { public static string text_games_ko {
get { get {
@ -26940,7 +27007,14 @@ namespace PKHeX.Core.Properties {
/// ///
/// ///
///太阳 ///太阳
///月亮. ///月亮
///
///
///Go
///紅
///藍色
///綠色
///黃色.
/// </summary> /// </summary>
public static string text_games_zh { public static string text_games_zh {
get { get {

View file

@ -7378,4 +7378,10 @@
<data name="_6th" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="_6th" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\misc\6th.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\img\misc\6th.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="fashion_f_sm_illegal" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\byte\fashion_f_sm_illegal;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="fashion_m_sm_illegal" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\byte\fashion_m_sm_illegal;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root> </root>

Binary file not shown.

Binary file not shown.

View file

@ -1,7 +1,18 @@
PKHeX - By Kaphotics PKHeX - By Kaphotics
http://projectpokemon.org/pkhex http://projectpokemon.org/pkhex
17/01/30 - New Update: 17/01/31 - New Update:
- Added: Default/Illegal(old code) fashion payloads for those wanting to undo/have anything.
- Changed: Internal program version updated to .NET 4.6.
- Changed: Improved exception checking for config & dll exceptions.
- Fixed: Geolocation data for 6->7 criteria relaxed to no longer falsely flag.
- Fixed: Alolan variant egg moves are now recognized correctly.
- Fixed: Japanese Event VC Mew no longer flagged for OT name.
- Fixed: Dream Ball inheritance check relaxed per new bank possibilities.
- Fixed: Importing wc6 on gen7 game no longer invalidates the origin version.
- Fixed: Setting Game Corner Coins to Gen1/2 saves is now capped at 9999.
17/01/30 - New Update: (9339) [251198]
- Added: Control right-clicking a PKM slot (box, party, etc) now allows direct legality checking. - Added: Control right-clicking a PKM slot (box, party, etc) now allows direct legality checking.
- Added: 6/7 detection preferential treatment & other detection methods. Thanks sora10pls! - Added: 6/7 detection preferential treatment & other detection methods. Thanks sora10pls!
- Added: Remove All medals button now clears Unlocked/Complete flags even if not visible. - Added: Remove All medals button now clears Unlocked/Complete flags even if not visible.

View file

@ -3,7 +3,7 @@
// Main Window // Main Window
CTRL-O: Open CTRL-O: Open
CTRL-S: Export PK6 CTRL-S: Export PKM
CTRL-E: Export SAV CTRL-E: Export SAV
CTRL-B: Export BAK CTRL-B: Export BAK
CTRL-Q: Quit CTRL-Q: Quit
@ -18,7 +18,7 @@ CTRL-SHIFT-T: Export Showdown Set
Control + Click on... Control + Click on...
- Species: Import Showdown/Smogon set from Clipboard. - Species: Import Showdown/Smogon set from Clipboard.
- Nickname/OT box: Bring up the ingame-special characters. - Nickname/OT box: Bring up the ingame-special characters.
- Individual IVs: Set IV to max. (toggle Hyper Training in Gen7 onwards) - Individual IVs: Set IV to max. (toggles Hyper Training in Gen7 onwards)
- Individual EVs: Set EV to max. - Individual EVs: Set EV to max.
- Randomize IVs: Set all IVs to max. - Randomize IVs: Set all IVs to max.
- Randomize EVs: Set all EVs to 0. - Randomize EVs: Set all EVs to 0.
@ -36,9 +36,13 @@ Shift + Click on...
Hold Control when dragging to save encrypted (ekx). Hold Control when dragging to save encrypted (ekx).
Click on the OT label to set relevant details to that of the save file. Click on...
- OT label: Set save file details to relevant properties.
- Met Location label: Suggest encounter information for relevant properties.
- Moves groupbox: Suggest legal moves.
- Relearn Moves groupbox: Suggest legal relearn moves.
Drop WC6/PGF/PCD/PGT to convert to PK6 in the main tabs. Drop WC7/WC6/PGF/PCD/PGT to convert to PKM in the main tabs.
// Save File // Save File
@ -51,6 +55,7 @@ Control-Shift-Click Box Tab: Sort All Boxes.
Alt-Click Box Tab: Delete Current Box contents. Alt-Click Box Tab: Delete Current Box contents.
Alt-Shift-Click Box Tab: Delete All Boxes. Alt-Shift-Click Box Tab: Delete All Boxes.
Control-RightClick a Box Slot to show extra options (ie Legality check)
Control-Drag a Box Slot to Copy-Overwrite Control-Drag a Box Slot to Copy-Overwrite
Alt-Drag a Box Slot to Delete-Overwrite Alt-Drag a Box Slot to Delete-Overwrite

View file

@ -1 +1 @@
20170130 20170131

View file

@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
</configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>

View file

@ -8,7 +8,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PKHeX.Tests</RootNamespace> <RootNamespace>PKHeX.Tests</RootNamespace>
<AssemblyName>PKHeX.Tests</AssemblyName> <AssemblyName>PKHeX.Tests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
@ -26,6 +26,7 @@
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath> <OutputPath>bin\x86\Release\</OutputPath>
@ -35,6 +36,7 @@
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />