diff --git a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs index 203721fec..f9a7ccaee 100644 --- a/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/MiscVerifier.cs @@ -96,6 +96,16 @@ public override void Verify(LegalityAnalysis data) private void VerifyMisc4(LegalityAnalysis data, G4PKM pk) { + // Verify misc values that were introduced in HG/SS + + // Version is a true match. If not from HG/SS, should not have HG/SS ball value set. + if (pk.BallHGSS != 0 || pk.BallDPPt != pk.Ball) + { + // Only set the HG/SS value if it originated in HG/SS and was not an event. + if (!pk.HGSS || pk.FatefulEncounter) + data.AddLine(GetInvalid(CheckIdentifier.Ball, BallEncMismatch)); + } + // Mood: // Range is [-127, 127]. Deduplicated unique adjustments are +8, +10, and -20. // Increment adjustments of -2 (-20 +8 +10) and +2 (+8*4 +10 -20) are possible. diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs index 036d71f26..61b4a40b9 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs @@ -709,8 +709,13 @@ private void ClickBall(object sender, EventArgs e) using var frm = new BallBrowser(); frm.LoadBalls(Entity); frm.ShowDialog(); - if (frm.WasBallChosen) - CB_Ball.SelectedValue = (int)frm.BallChoice; + if (!frm.WasBallChosen) + return; + + // Set to the entity, then check the updated value. + // Gen4 has split fields for HG/SS and D/P/Pt segregation. If the value refused to update, show the refused value. + Entity.Ball = frm.BallChoice; + CB_Ball.SelectedValue = (int)Entity.Ball; } private void ClickMetLocation(object sender, EventArgs e)