From e1b8a07cef8328fbd6861ee5c13c244e227e5d18 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 12 Feb 2017 22:31:31 -0800 Subject: [PATCH] split rb/y personal|lvlup binaries slightly different values between games (fly charizard Yellow only), tm etc. Use yellow for pk1/sav1 but it doesn't matter (only TMs different, which are unused). --- PKHeX/Legality/Core.cs | 23 ++++--- PKHeX/PKHeX.Core.csproj | 4 ++ PKHeX/PKM/PK1.cs | 2 +- PKHeX/PersonalInfo/PersonalTable.cs | 3 +- PKHeX/Properties/Resources.Designer.cs | 58 ++++++++++++------ PKHeX/Properties/Resources.resx | 18 ++++-- PKHeX/Resources/byte/lvlmove_rb.pkl | Bin 0 -> 1608 bytes .../byte/{lvlmove_rby.pkl => lvlmove_y.pkl} | Bin .../byte/{personal_rby => personal_rb} | Bin PKHeX/Resources/byte/personal_y | Bin 0 -> 4256 bytes PKHeX/Saves/SAV1.cs | 2 +- 11 files changed, 75 insertions(+), 35 deletions(-) create mode 100644 PKHeX/Resources/byte/lvlmove_rb.pkl rename PKHeX/Resources/byte/{lvlmove_rby.pkl => lvlmove_y.pkl} (100%) rename PKHeX/Resources/byte/{personal_rby => personal_rb} (100%) create mode 100644 PKHeX/Resources/byte/personal_y diff --git a/PKHeX/Legality/Core.cs b/PKHeX/Legality/Core.cs index 3ba8ea20c..92512f2bc 100644 --- a/PKHeX/Legality/Core.cs +++ b/PKHeX/Legality/Core.cs @@ -11,8 +11,8 @@ public static partial class Legal public static MysteryGift[] MGDB_G6, MGDB_G7 = new MysteryGift[0]; // Gen 1 - private static readonly Learnset[] LevelUpRB = Learnset1.getArray(Resources.lvlmove_rby); - private static readonly Learnset[] LevelUpY = Learnset1.getArray(Resources.lvlmove_rby); + private static readonly Learnset[] LevelUpRB = Learnset1.getArray(Resources.lvlmove_rb); + private static readonly Learnset[] LevelUpY = Learnset1.getArray(Resources.lvlmove_y); private static readonly EvolutionTree Evolves1; private static readonly EncounterArea[] SlotsRBY; private static readonly EncounterStatic[] StaticRBY; @@ -138,7 +138,7 @@ private static void MarkG7SMSlots(ref EncounterArea[] Areas) { // Gen 1 { - Evolves1 = new EvolutionTree(new[] { Resources.evos_rby }, GameVersion.RBY, PersonalTable.RBY, MaxSpeciesID_1); + Evolves1 = new EvolutionTree(new[] { Resources.evos_rby }, GameVersion.RBY, PersonalTable.Y, MaxSpeciesID_1); var red = EncounterArea.getArray1_GW(Resources.encounter_red); var blu = EncounterArea.getArray1_GW(Resources.encounter_blue); var ylw = EncounterArea.getArray1_GW(Resources.encounter_yellow); @@ -806,7 +806,9 @@ private static IEnumerable getLVLMoves(PKM pkm, int species, int lvl, int f List moves = new List(); if (pkm.InhabitedGeneration(1)) { - moves.AddRange(((PersonalInfoG1)PersonalTable.RBY[species]).Moves); + moves.AddRange(((PersonalInfoG1)PersonalTable.RB[species]).Moves); + moves.AddRange(((PersonalInfoG1)PersonalTable.Y[species]).Moves); + moves.AddRange(LevelUpRB[species].getMoves(lvl)); moves.AddRange(LevelUpY[species].getMoves(lvl)); } if (pkm.InhabitedGeneration(6)) @@ -1042,13 +1044,20 @@ private static IEnumerable getMoves(PKM pkm, int species, int lvl, int form { case 1: { - PersonalInfo pi = PersonalTable.RBY[species]; + var pi_rb = (PersonalInfoG1)PersonalTable.RB[species]; + var pi_y = (PersonalInfoG1)PersonalTable.Y[species]; if (LVL) { - r.AddRange(((PersonalInfoG1)pi).Moves); + r.AddRange(pi_rb.Moves); + r.AddRange(pi_y.Moves); r.AddRange(LevelUpRB[species].getMoves(lvl)); + r.AddRange(LevelUpY[species].getMoves(lvl)); + } + if (Machine) + { + r.AddRange(TMHM_RBY.Where((t, m) => pi_rb.TMHM[m])); + r.AddRange(TMHM_RBY.Where((t, m) => pi_y.TMHM[m])); } - if (Machine) r.AddRange(TMHM_RBY.Where((t, m) => pi.TMHM[m])); break; } case 6: diff --git a/PKHeX/PKHeX.Core.csproj b/PKHeX/PKHeX.Core.csproj index 2dd8b260c..132316f70 100644 --- a/PKHeX/PKHeX.Core.csproj +++ b/PKHeX/PKHeX.Core.csproj @@ -276,9 +276,13 @@ + + + + diff --git a/PKHeX/PKM/PK1.cs b/PKHeX/PKM/PK1.cs index f0babd96f..8c1ad0683 100644 --- a/PKHeX/PKM/PK1.cs +++ b/PKHeX/PKM/PK1.cs @@ -8,7 +8,7 @@ public class PK1 : PKM // Internal use only protected internal byte[] otname; protected internal byte[] nick; - public override PersonalInfo PersonalInfo => PersonalTable.RBY[Species]; + public override PersonalInfo PersonalInfo => PersonalTable.Y[Species]; public byte[] OT_Name_Raw => (byte[])otname.Clone(); public byte[] Nickname_Raw => (byte[])nick.Clone(); diff --git a/PKHeX/PersonalInfo/PersonalTable.cs b/PKHeX/PersonalInfo/PersonalTable.cs index 7e6e54571..dcf2c28b5 100644 --- a/PKHeX/PersonalInfo/PersonalTable.cs +++ b/PKHeX/PersonalInfo/PersonalTable.cs @@ -18,7 +18,8 @@ public class PersonalTable public static readonly PersonalTable RS = new PersonalTable(Properties.Resources.personal_rs, GameVersion.RS); public static readonly PersonalTable C = new PersonalTable(Properties.Resources.personal_c, GameVersion.C); public static readonly PersonalTable GS = new PersonalTable(Properties.Resources.personal_c, GameVersion.GS); - public static readonly PersonalTable RBY = new PersonalTable(Properties.Resources.personal_rby, GameVersion.RBY); + public static readonly PersonalTable RB = new PersonalTable(Properties.Resources.personal_rb, GameVersion.RBY); + public static readonly PersonalTable Y = new PersonalTable(Properties.Resources.personal_y, GameVersion.RBY); private static byte[][] splitBytes(byte[] data, int size) { diff --git a/PKHeX/Properties/Resources.Designer.cs b/PKHeX/Properties/Resources.Designer.cs index ba75d688c..a534e828a 100644 --- a/PKHeX/Properties/Resources.Designer.cs +++ b/PKHeX/Properties/Resources.Designer.cs @@ -17826,9 +17826,9 @@ public class Resources { /// /// Looks up a localized resource of type System.Byte[]. /// - public static byte[] lvlmove_rby { + public static byte[] lvlmove_rb { get { - object obj = ResourceManager.GetObject("lvlmove_rby", resourceCulture); + object obj = ResourceManager.GetObject("lvlmove_rb", resourceCulture); return ((byte[])(obj)); } } @@ -17853,6 +17853,16 @@ public class Resources { } } + /// + /// Looks up a localized resource of type System.Byte[]. + /// + public static byte[] lvlmove_y { + get { + object obj = ResourceManager.GetObject("lvlmove_y", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -18016,9 +18026,9 @@ public class Resources { /// /// Looks up a localized resource of type System.Byte[]. /// - public static byte[] personal_rby { + public static byte[] personal_rb { get { - object obj = ResourceManager.GetObject("personal_rby", resourceCulture); + object obj = ResourceManager.GetObject("personal_rb", resourceCulture); return ((byte[])(obj)); } } @@ -18053,6 +18063,16 @@ public class Resources { } } + /// + /// Looks up a localized resource of type System.Byte[]. + /// + public static byte[] personal_y { + get { + object obj = ResourceManager.GetObject("personal_y", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Looks up a localized resource of type System.Byte[]. /// @@ -26755,8 +26775,8 @@ public class Resources { /// ///Go ///Rote + ///Blaue[INT]/Grüne[JP] ///Blaue - ///Grüne ///Gelbe. /// public static string text_games_de { @@ -26802,8 +26822,8 @@ public class Resources { /// ///Go ///Red - ///Blue - ///Green + ///Blue[INT]/Green[JP] + ///Blue[JP] ///Yellow. /// public static string text_games_en { @@ -26849,8 +26869,8 @@ public class Resources { /// ///Go ///Roja - ///Azul - ///Verde + ///Azul[INT]/Verde[JP] + ///Azul[JP] ///Amarilla. /// public static string text_games_es { @@ -26896,8 +26916,8 @@ public class Resources { /// ///Go ///Rouge - ///Bleue - ///Vert + ///Bleue[INT]/Vert[JP] + ///Bleue[JP] ///Jaune. /// public static string text_games_fr { @@ -26943,8 +26963,8 @@ public class Resources { /// ///Go ///Rossa - ///Blu - ///Verde + ///Blu[INT]/Verde[JP] + ///Blu[JP] ///Gialla. /// public static string text_games_it { @@ -26990,8 +27010,8 @@ public class Resources { /// ///Go ///赤 - ///青 - ///緑 + ///青[INT]/緑[JP] + ///青[JP] ///黄. /// public static string text_games_ja { @@ -27037,8 +27057,8 @@ public class Resources { /// ///고 ///레드 - ///블루 - ///그린 + ///블루[INT]/그린[JP] + ///블루[JP] ///옐로. /// public static string text_games_ko { @@ -27084,8 +27104,8 @@ public class Resources { /// ///Go ///紅 - ///藍色 - ///綠色 + ///藍色[INT]/綠色[JP] + ///藍色[JP] ///黃色. /// public static string text_games_zh { diff --git a/PKHeX/Properties/Resources.resx b/PKHeX/Properties/Resources.resx index 8f83d57d0..e289d474b 100644 --- a/PKHeX/Properties/Resources.resx +++ b/PKHeX/Properties/Resources.resx @@ -6388,9 +6388,6 @@ ..\Resources\text\version.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - ..\Resources\byte\personal_rby;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - ..\Resources\text\gen3\text_gsc_00000_en.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 @@ -7387,9 +7384,6 @@ ..\Resources\byte\evos_rby.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\byte\lvlmove_rby.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - ..\Resources\byte\encounter_blue.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -7405,4 +7399,16 @@ ..\Resources\byte\encounter_yellow_f.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\byte\lvlmove_rb.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\byte\lvlmove_y.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\byte\personal_rb;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\byte\personal_y;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/PKHeX/Resources/byte/lvlmove_rb.pkl b/PKHeX/Resources/byte/lvlmove_rb.pkl new file mode 100644 index 0000000000000000000000000000000000000000..21bc88abdd4db737a1fe09eb7656f6a3e39b11e6 GIT binary patch literal 1608 zcmZ9M>u=Lm6u{3`b$!q_&BL)1$M45=eC@<>9*!WQD_e(Xn}ktRsHO(oe8`%%l$MBA z8xjkw(ilQ}@BtdoB*^~I-MH>L_Qm)2JNHQEKF&2v+?Y)!>gUe2ur!nCEKS+1UoI?R>5HJJP(;w7!j1Lc`n4TQ0T2k2S; zLd<8SDgexEM(Xp8Xp?f%F|jrZ2=l!}Hr3`$#fS0C%vL;>iK@PJ6bKa)qK03%5X-L| z!Nk_wUvy9Y7y#SLeuOC;5t2vTqUr~jI+7Q$57S1}VqORxy%-?-Lha;>Ftt9vmF`PE zz5_6wi4GY<=<9<3SwrpT2QWE3XHbZ<)B$D!p^<212W}`bO!6e5#|f%9N+3e_L?J7V z5=NrIY(6%|>I^>?^*Z)bu89g`(GR(``Y- zj(^8wgrTt!qB6{Hz>F3Bg6T*DYZ#(7C=MZm1Xta}19D*_M4QgwN);lXQvyL zZ7HWgtVCm8MZQ}m+q@U|Qe%RwpV-wv(qodGJt>?CncqyfY)#nKTjrxrCGk}Xi#@cI zy9Ogvd)89v6P#5d^;nZ?q>IvuNx_-Y4X&uK6wVbUoLMDiBt77mhas{aWn4{^t> z!lnKByVP;ID{QEzp>SPw1OHEWB+`nF*0AdMa4vb(^C9LYIo6gulP-Eyb)24W8V6Mq$9lJ7nT_MY-9aQF1^6G_DHrrHvPyD;NM zHyMt5DYmrxp-3;a7QPROOQ{*2R^A%j0A<>ITj)ZxkUZuN)IK?sGc@|{DWo1{Zio%7 zZmv2_$k33&LQmK5yIh-~)XQqlJFg8AtEX|#`K6o!X+odGQ_gt#YnY%TF1;^Mr~~2? zZPz%q51mtjXcr$B4$G%N7J&@G7G3PAp*W(4zf^(A^R~WYkyljFfx9l&)dp(XRACv? zmVngpEYAH2@m&VzMqTn)f_PF|UO9StoU zLJpHD$|5Ri))rvl W;kDK`+bflCPhk4@#5n)hXu&^@=QK$G literal 0 HcmV?d00001 diff --git a/PKHeX/Resources/byte/lvlmove_rby.pkl b/PKHeX/Resources/byte/lvlmove_y.pkl similarity index 100% rename from PKHeX/Resources/byte/lvlmove_rby.pkl rename to PKHeX/Resources/byte/lvlmove_y.pkl diff --git a/PKHeX/Resources/byte/personal_rby b/PKHeX/Resources/byte/personal_rb similarity index 100% rename from PKHeX/Resources/byte/personal_rby rename to PKHeX/Resources/byte/personal_rb diff --git a/PKHeX/Resources/byte/personal_y b/PKHeX/Resources/byte/personal_y new file mode 100644 index 0000000000000000000000000000000000000000..7c5704b4c8ea4c1378b9c82776e6adc0f68fece8 GIT binary patch literal 4256 zcmZ{ne{>VqmB*hn5*C8Qgh;l;55@8jJlH%igUJ{(V2y>xvd7rtAJ3SvujI zHyz87y(CZ~3&4))SKA-%bmF4BY)(yMjYeEneBJo5hPr_jP;Ulnr*Aq|p^TMA)|Elc77?rQhQZwH^M34QX>SGi7;8 zA!SfsQ|D~(=XC-bPBS;d`^1MJmJ%X_7E}h{Y>^pD8N`w$D1x>TS(P)!p`cM7zy)Sr z(kz?iS8@zR&2Azk0~>bHfY2D_nNB2gk%uScvOrPFGsX)|dz$G223Ro7yfo)i*zD|y zdP25T)-;;yjgK6iy6h=Ki+F|8l4n=b7k8m$s#wVrguDm!?L8kxR#Q9n+Qx^|?BV4r7y;^U zqEx>fs;eqWojc`#+O(qOmDQ4_xm?og#?PxhsxHdwTm|QlW_dB}a)Dl6ttR2lvaZ#T zvebHKVLj%Eh%xAe?bG*neWR^r`>E7=CR@Q^8qVE1`v{rS|7rhG^BnRi&tw^_moLep zB2iZ5C&r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1On6EKp+FL0-)F-*E-tP_~u&7vp@{(anwE0(>T?f=jB<(~71jLoO@zuf~;q=MMxL zQp}NB@0k?=%(9CX;UFok%c(ctWA?Gqt5Y{U3(>P18wF8Zv}o~D`bhn|4Rk>hob4U< z{gy+jtSz$6{k`FcE#CvI!~XA}iJKl4o#>4!i5EN`>Jww-wnZ&r_F$Xce0N-ccffO+ V`9ZA&$cK?X_F5oi)a;$_{{gx_thN9E literal 0 HcmV?d00001 diff --git a/PKHeX/Saves/SAV1.cs b/PKHeX/Saves/SAV1.cs index 431bdab30..f175cb22e 100644 --- a/PKHeX/Saves/SAV1.cs +++ b/PKHeX/Saves/SAV1.cs @@ -33,7 +33,7 @@ public SAV1(byte[] data = null, GameVersion versionOverride = GameVersion.Any) Party = getPartyOffset(0); Japanese = SaveUtil.getIsG1SAVJ(Data); - Personal = PersonalTable.RBY; + Personal = PersonalTable.Y; // Stash boxes after the save file's end. byte[] TempBox = new byte[SIZE_STOREDBOX];