Ban voltorb-1 ball inheritance

This commit is contained in:
Kurt 2023-07-07 21:12:19 -07:00
parent c52b49de08
commit 014cd8c738
4 changed files with 11 additions and 6 deletions

View file

@ -70,7 +70,7 @@ internal static class BallUseLegality
internal const ulong WildPokeballs8 = WildPokeballs7 | WildPokeEnhance8;
private const ulong WildPokeballs7b = WildPokeRegular | (1 << (int)Premier);
private const ulong WildPokeballs8g = WildPokeballs7b & ~(1ul << (int)Master); // Ultra Great Poke Premier, no Master
internal const ulong WildPokeballs8g = WildPokeballs7b & ~(1ul << (int)Master); // Ultra Great Poke Premier, no Master
internal const ulong WildPokeballs9 = WildPokeballs7 | WildPokeEnhance5; // Same as Gen7 + Dream
}

View file

@ -454,10 +454,15 @@ public sealed class BallVerifier : Verifier
private CheckResult VerifyBallEggGen9(LegalityAnalysis data)
{
var species = data.EncounterMatch.Species;
var enc = data.EncounterMatch;
var species = enc.Species;
if (species is >= (int)Species.Sprigatito and <= (int)Species.Quaquaval) // G9 Starters
return VerifyBallEquals(data, (int)Poke);
// PLA Voltorb: Only via PLA (transfer only, not wild)
if (enc is { Species: (ushort)Species.Voltorb, Form: 1 })
return VerifyBallEquals(data, BallUseLegality.WildPokeballs8g);
var pk = data.Entity;
if (IsPaldeaCatchAndBreed(species) && IsBallPermitted(BallUseLegality.WildPokeballs9, pk.Ball))
return GetValid(LBallSpeciesPass);

View file

@ -45,12 +45,12 @@ public sealed class TrainerNameVerifier : Verifier
if (ParseSettings.CheckWordFilter)
{
if (WordFilter.IsFiltered(ot, out var badPattern))
data.AddLine(GetInvalid($"Wordfilter: {badPattern}"));
data.AddLine(GetInvalid($"Word Filter: {badPattern}"));
if (ContainsTooManyNumbers(ot, data.Info.Generation))
data.AddLine(GetInvalid("Wordfilter: Too many numbers."));
data.AddLine(GetInvalid("Word Filter: Too many numbers."));
if (WordFilter.IsFiltered(pk.HT_Name, out badPattern))
data.AddLine(GetInvalid($"Wordfilter: {badPattern}"));
data.AddLine(GetInvalid($"Word Filter: {badPattern}"));
}
}

View file

@ -50,7 +50,7 @@ namespace PKHeX.WinForms
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
Name = "BallBrowser";
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Text = "BallBrowser";
Text = "Ball Browser";
ResumeLayout(false);
PerformLayout();