mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-24 04:53:08 +00:00
Merge pull request #9 from kwsch/master
Update from upstream repo kwsch/PKHeX
This commit is contained in:
commit
bd991b7bed
10 changed files with 177 additions and 2 deletions
1
PKHeX.WinForms/MainWindow/Main.Designer.cs
generated
1
PKHeX.WinForms/MainWindow/Main.Designer.cs
generated
|
@ -938,6 +938,7 @@
|
|||
this.TB_Level.Size = new System.Drawing.Size(22, 20);
|
||||
this.TB_Level.TabIndex = 8;
|
||||
this.TB_Level.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.TB_Level.Click += new System.EventHandler(this.clickLevel);
|
||||
this.TB_Level.TextChanged += new System.EventHandler(this.updateEXPLevel);
|
||||
//
|
||||
// MT_Level
|
||||
|
|
|
@ -1714,6 +1714,15 @@ namespace PKHeX.WinForms
|
|||
else
|
||||
TB_Friendship.Text = TB_Friendship.Text == "255" ? SAV.Personal[pkm.Species].BaseFriendship.ToString() : "255";
|
||||
}
|
||||
|
||||
private void clickLevel(object sender, EventArgs e)
|
||||
{
|
||||
if (ModifierKeys == Keys.Control)
|
||||
{
|
||||
((MaskedTextBox)sender).Text = "100";
|
||||
}
|
||||
}
|
||||
|
||||
private void clickGender(object sender, EventArgs e)
|
||||
{
|
||||
// Get Gender Threshold
|
||||
|
@ -2814,6 +2823,8 @@ namespace PKHeX.WinForms
|
|||
pkm.Nature = CB_Nature.SelectedIndex;
|
||||
updateRandomPID(sender, e);
|
||||
}
|
||||
if (sender == CB_HeldItem && SAV.Generation == 7)
|
||||
updateLegality();
|
||||
}
|
||||
updateNatureModification(sender, null);
|
||||
updateIVs(null, null); // updating Nature will trigger stats to update as well
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
return GameVersion.RBY;
|
||||
|
||||
case GameVersion.GS:
|
||||
case GameVersion.GD:
|
||||
case GameVersion.SV:
|
||||
case GameVersion.C:
|
||||
return GameVersion.GSC;
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
BATREV = -7,
|
||||
RSBOX = -5,
|
||||
GS = -4,
|
||||
C = -3,
|
||||
|
||||
// Indicators
|
||||
Invalid = -2,
|
||||
|
@ -23,6 +22,7 @@
|
|||
/*Gen7*/ SN = 30, MN = 31,
|
||||
/* GO */ GO = 34,
|
||||
/* VC */ RD = 35, GN = 36, BU = 37, YW = 38, // GN = Blue for international release
|
||||
GD, SV, C,
|
||||
|
||||
// Game Groupings (SaveFile type)
|
||||
RBY = 98,
|
||||
|
|
|
@ -174,6 +174,7 @@ namespace PKHeX.Core
|
|||
verifyForm();
|
||||
verifyMisc();
|
||||
verifyGender();
|
||||
verifyItem();
|
||||
|
||||
verifyVersionEvolution();
|
||||
// SecondaryChecked = true;
|
||||
|
|
|
@ -69,6 +69,14 @@ namespace PKHeX.Core
|
|||
// return;
|
||||
}
|
||||
}
|
||||
|
||||
private void verifyItem()
|
||||
{
|
||||
var unreleasedItems = Legal.getUnreleasedItems(pkm.Format);
|
||||
if (unreleasedItems.Contains(pkm.HeldItem))
|
||||
AddLine(Severity.Invalid, "Held item is unreleased.", CheckIdentifier.Form);
|
||||
}
|
||||
|
||||
private void verifyECPID()
|
||||
{
|
||||
if (pkm.EncryptionConstant == 0)
|
||||
|
|
|
@ -21,6 +21,8 @@ namespace PKHeX.Core
|
|||
private static readonly Learnset[] LevelUpGS = Learnset1.getArray(Resources.lvlmove_gs, MaxSpeciesID_2);
|
||||
private static readonly Learnset[] LevelUpC = Learnset1.getArray(Resources.lvlmove_c, MaxSpeciesID_2);
|
||||
private static readonly EvolutionTree Evolves2;
|
||||
private static readonly EncounterArea[] SlotsGSC;
|
||||
private static readonly EncounterStatic[] StaticGSC;
|
||||
|
||||
// Gen 6
|
||||
private static readonly EggMoves[] EggMovesXY = EggMoves6.getArray(Data.unpackMini(Resources.eggmove_xy, "xy"));
|
||||
|
@ -46,6 +48,9 @@ namespace PKHeX.Core
|
|||
{
|
||||
case GameVersion.RBY:
|
||||
return Encounter_RBY; // GameVersion filtering not possible, return immediately
|
||||
case GameVersion.GSC:
|
||||
return Encounter_GSC;
|
||||
|
||||
case GameVersion.X: case GameVersion.Y:
|
||||
table = Encounter_XY;
|
||||
break;
|
||||
|
@ -161,6 +166,10 @@ namespace PKHeX.Core
|
|||
// Gen 2
|
||||
{
|
||||
Evolves2 = new EvolutionTree(new[] { Resources.evos_gsc }, GameVersion.GSC, PersonalTable.C, MaxSpeciesID_2);
|
||||
|
||||
SlotsGSC = new EncounterArea[0]; // todo
|
||||
|
||||
StaticGSC = getStaticEncounters(GameVersion.GSC);
|
||||
}
|
||||
// Gen 6
|
||||
{
|
||||
|
@ -1072,6 +1081,11 @@ namespace PKHeX.Core
|
|||
case GameVersion.GN: case GameVersion.YW:
|
||||
return getSlots(pkm, SlotsRBY, lvl);
|
||||
|
||||
case GameVersion.GSC:
|
||||
case GameVersion.GD: case GameVersion.SV:
|
||||
case GameVersion.C:
|
||||
return getSlots(pkm, SlotsGSC, lvl);
|
||||
|
||||
case GameVersion.X:
|
||||
return getSlots(pkm, SlotsX, lvl);
|
||||
case GameVersion.Y:
|
||||
|
@ -1097,6 +1111,11 @@ namespace PKHeX.Core
|
|||
case GameVersion.GN: case GameVersion.YW:
|
||||
return getStatic(pkm, StaticRBY, lvl);
|
||||
|
||||
case GameVersion.GSC:
|
||||
case GameVersion.GD: case GameVersion.SV:
|
||||
case GameVersion.C:
|
||||
return getStatic(pkm, StaticGSC, lvl);
|
||||
|
||||
case GameVersion.X:
|
||||
return getStatic(pkm, StaticX, lvl);
|
||||
case GameVersion.Y:
|
||||
|
@ -1346,6 +1365,23 @@ namespace PKHeX.Core
|
|||
r.AddRange(getTutorMoves(pkm, species, form, specialTutors));
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
int index = PersonalTable.C.getFormeIndex(species, 0);
|
||||
var pi_c = (PersonalInfoG1)PersonalTable.C[index];
|
||||
if (LVL)
|
||||
{
|
||||
r.AddRange(LevelUpGS[index].getMoves(lvl));
|
||||
r.AddRange(LevelUpC[index].getMoves(lvl));
|
||||
}
|
||||
if (Machine)
|
||||
{
|
||||
r.AddRange(TMHM_GSC.Where((t, m) => pi_c.TMHM[m]));
|
||||
}
|
||||
if (moveTutor)
|
||||
r.AddRange(getTutorMoves(pkm, species, form, specialTutors));
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
switch (ver)
|
||||
{
|
||||
|
@ -1457,5 +1493,14 @@ namespace PKHeX.Core
|
|||
// No tutors in G7
|
||||
return moves.Distinct();
|
||||
}
|
||||
|
||||
public static int[] getUnreleasedItems(int generation)
|
||||
{
|
||||
switch (generation)
|
||||
{
|
||||
case 7: return UnreleasedItems_7;
|
||||
default: return new int[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,15 +35,29 @@ namespace PKHeX.Core
|
|||
10, 05, 10, 20, 20, 40, 15, 10, 20, 20, 25, 05, 15, 10, 05, 20, 15, 20, 25, 20, 05, 30, 05, 10, 20, 40, 05, 20, 40, 20, 15, 35, 10, 05, 05, 05, 15, 05, 20, 05, 05, 15, 20, 10, 05, 05, 15, 15, 15, 15,
|
||||
10, 00, 00, 00, 00
|
||||
};
|
||||
internal static readonly int[] TMHM_GSC =
|
||||
{
|
||||
223, 029, 174, 205, 046, 092, 192, 249, 244, 237,
|
||||
241, 230, 173, 059, 063, 196, 182, 240, 202, 203,
|
||||
218, 076, 231, 225, 087, 089, 216, 091, 094, 247,
|
||||
189, 104, 008, 207, 214, 188, 201, 126, 129, 111,
|
||||
009, 138, 197, 156, 213, 168, 211, 007, 210, 171,
|
||||
|
||||
015, 019, 057, 070, 148, 250, 127
|
||||
};
|
||||
internal static readonly int[] WildPokeBalls2 = { 4 };
|
||||
|
||||
internal static readonly int[] FutureEvolutionsGen2 =
|
||||
{
|
||||
424,429,430,461,462,463,464,465,466,467,468,469,470,471,472,473,474,700
|
||||
};
|
||||
internal static readonly EncounterStatic[] Encounter_GSC =
|
||||
{
|
||||
// todo
|
||||
};
|
||||
internal static readonly EncounterTrade[] TradeGift_GSC =
|
||||
{
|
||||
|
||||
// todo
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1250,5 +1250,97 @@ namespace PKHeX.Core
|
|||
};
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unreleased Items
|
||||
internal static readonly int[] UnreleasedItems_7 =
|
||||
{
|
||||
016, // Cherish Ball
|
||||
064, // Fluffy Tail
|
||||
065, // Blue Flute
|
||||
066, // Yellow Flute
|
||||
067, // Red Flute
|
||||
068, // Black Flute
|
||||
069, // White Flute
|
||||
070, // Shoal Salt
|
||||
071, // Shoal Shell
|
||||
099, // Root Fossil
|
||||
100, // Claw Fossil
|
||||
101, // Helix Fossil
|
||||
102, // Dome Fossil
|
||||
103, // Old Amber
|
||||
111, // Odd Keystone
|
||||
164, // Razz Berry
|
||||
166, // Nanab Berry
|
||||
167, // Wepear Berry
|
||||
175, // Cornn Berry
|
||||
176, // Magost Berry
|
||||
177, // Rabuta Berry
|
||||
178, // Nomel Berry
|
||||
179, // Spelon Berry
|
||||
180, // Pamtre Berry
|
||||
181, // Watmel Berry
|
||||
182, // Durin Berry
|
||||
183, // Belue Berry
|
||||
208, // Enigma Berry
|
||||
209, // Micle Berry
|
||||
210, // Custap Berry
|
||||
211, // Jaboca Berry
|
||||
212, // Rowap Berry
|
||||
215, // Macho Brace
|
||||
260, // Red Scarf
|
||||
261, // Blue Scarf
|
||||
262, // Pink Scarf
|
||||
263, // Green Scarf
|
||||
264, // Yellow Scarf
|
||||
548, // Fire Gem
|
||||
549, // Water Gem
|
||||
550, // Electric Gem
|
||||
551, // Grass Gem
|
||||
552, // Ice Gem
|
||||
553, // Fighting Gem
|
||||
554, // Poison Gem
|
||||
555, // Ground Gem
|
||||
556, // Flying Gem
|
||||
557, // Psychic Gem
|
||||
558, // Bug Gem
|
||||
559, // Rock Gem
|
||||
560, // Ghost Gem
|
||||
561, // Dragon Gem
|
||||
562, // Dark Gem
|
||||
563, // Steel Gem
|
||||
657, // Gardevoirite
|
||||
658, // Ampharosite
|
||||
662, // Mewtwonite X
|
||||
663, // Mewtwonite Y
|
||||
664, // Blazikenite
|
||||
665, // Medichamite
|
||||
666, // Houndoominite
|
||||
667, // Aggronite
|
||||
668, // Banettite
|
||||
669, // Tyranitarite
|
||||
674, // Abomasite
|
||||
680, // Heracronite
|
||||
681, // Mawilite
|
||||
682, // Manectite
|
||||
684, // Latiasite
|
||||
685, // Latiosite
|
||||
710, // Jaw Fossil
|
||||
711, // Sail Fossil
|
||||
715, // Fairy Gem
|
||||
752, // Swamperite
|
||||
753, // Sceptilite
|
||||
755, // Altarianite
|
||||
756, // Galladite
|
||||
757, // Audinite
|
||||
761, // Steelixite
|
||||
762, // Pidgeotite
|
||||
764, // Diancite
|
||||
767, // Cameruptite
|
||||
768, // Lopunnite
|
||||
770, // Beeddrillite
|
||||
802, // Marshadium Z
|
||||
836, // Pikashunium Z
|
||||
};
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ Control + Click on...
|
|||
- Randomize EVs: Set all EVs to 0.
|
||||
- PP Ups Label: Set all PP Ups to 0. (Click = 3)
|
||||
- Friendship Label: Set Friendship to 0. (Click = 255 or Base)
|
||||
- Level box: Set Level to 100.
|
||||
|
||||
Alt + Click on...
|
||||
- Preview Sprite to load from a QR url on your clipboard.
|
||||
|
|
Loading…
Reference in a new issue