mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-08 09:16:16 -05:00
Ban voltorb-1 ball inheritance
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -454,10 +454,15 @@ private CheckResult VerifyBallEggGen8(LegalityAnalysis data)
|
||||
|
||||
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);
|
||||
|
||||
@@ -45,12 +45,12 @@ public override void Verify(LegalityAnalysis data)
|
||||
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}"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ private void InitializeComponent()
|
||||
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
Name = "BallBrowser";
|
||||
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
Text = "BallBrowser";
|
||||
Text = "Ball Browser";
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user