diff --git a/PKHeX.Core/Legality/Areas/EncounterArea8.cs b/PKHeX.Core/Legality/Areas/EncounterArea8.cs index cc2e6e90d..cf67096cb 100644 --- a/PKHeX.Core/Legality/Areas/EncounterArea8.cs +++ b/PKHeX.Core/Legality/Areas/EncounterArea8.cs @@ -473,7 +473,7 @@ public enum AreaSlotType8 : byte public static class AreaSlotType8Extensions { - public static bool CanCrossover(this AreaSlotType8 type) => type is not HiddenMain or HiddenMain2 or OnlyFishing; + public static bool CanCrossover(this AreaSlotType8 type) => type is not (HiddenMain or HiddenMain2 or OnlyFishing); public static bool CanEncounterViaFishing(this AreaSlotType8 type, AreaWeather8 weather) => type is OnlyFishing || weather.HasFlag(Fishing); public static bool CanEncounterViaCurry(this AreaSlotType8 type) => type is HiddenMain or HiddenMain2; } diff --git a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic4.cs b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic4.cs index e793c33a4..334143324 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic4.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic4.cs @@ -54,7 +54,7 @@ protected override bool IsMatchEggLocation(PKM pkm) // Unhatched: if (eggloc != EggLocation) return false; - if (pk4.Met_Location is not 0 or Locations.LinkTrade4) + if (pk4.Met_Location is not (0 or Locations.LinkTrade4)) return false; return true; } diff --git a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic5.cs b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic5.cs index 6e9d9ac54..ae08bdcd6 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic5.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic5.cs @@ -40,7 +40,7 @@ protected override bool IsMatchEggLocation(PKM pkm) // Unhatched: if (eggloc != EggLocation) return false; - if (pkm.Met_Location is not 0 or Locations.LinkTrade5) + if (pkm.Met_Location is not (0 or Locations.LinkTrade5)) return false; return true; } diff --git a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic6.cs b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic6.cs index 7082a9052..be27ebf16 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic6.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic6.cs @@ -42,7 +42,7 @@ protected override bool IsMatchEggLocation(PKM pkm) // Unhatched: if (eggloc != EggLocation) return false; - if (pkm.Met_Location is not 0 or Locations.LinkTrade6) + if (pkm.Met_Location is not (0 or Locations.LinkTrade6)) return false; return true; } diff --git a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic7.cs b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic7.cs index d078a40b3..23aa1697b 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic7.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic7.cs @@ -35,7 +35,7 @@ protected override bool IsMatchEggLocation(PKM pkm) // Unhatched: if (eggloc != EggLocation) return false; - if (pkm.Met_Location is not 0 or Locations.LinkTrade6) + if (pkm.Met_Location is not (0 or Locations.LinkTrade6)) return false; return true; } diff --git a/PKHeX.Core/Legality/Restrictions/GBRestrictions.cs b/PKHeX.Core/Legality/Restrictions/GBRestrictions.cs index d17be4d79..b09150aab 100644 --- a/PKHeX.Core/Legality/Restrictions/GBRestrictions.cs +++ b/PKHeX.Core/Legality/Restrictions/GBRestrictions.cs @@ -556,6 +556,6 @@ public enum TimeCapsuleEvaluation public static class TimeCapsuleEvlautationExtensions { - public static bool WasTimeCapsuleTransferred(this TimeCapsuleEvaluation eval) => eval is not TimeCapsuleEvaluation.Indeterminate or TimeCapsuleEvaluation.NotTransferred or TimeCapsuleEvaluation.BadCatchRate; + public static bool WasTimeCapsuleTransferred(this TimeCapsuleEvaluation eval) => eval is not (TimeCapsuleEvaluation.Indeterminate or TimeCapsuleEvaluation.NotTransferred or TimeCapsuleEvaluation.BadCatchRate); } } diff --git a/PKHeX.Core/Legality/Verifiers/Ribbons/RibbonVerifier.cs b/PKHeX.Core/Legality/Verifiers/Ribbons/RibbonVerifier.cs index f2654a71b..579df5694 100644 --- a/PKHeX.Core/Legality/Verifiers/Ribbons/RibbonVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/Ribbons/RibbonVerifier.cs @@ -518,7 +518,7 @@ private static bool CanHaveRibbonWinning(PKM pkm, IEncounterTemplate enc, int ge if (enc.LevelMin <= 50) return true; - return enc is not EncounterStaticShadow or WC3; + return enc is not (EncounterStaticShadow or WC3); } private static bool CanHaveRibbonVictory(PKM pkm, int gen) diff --git a/PKHeX.Core/PKM/Searching/SearchSettings.cs b/PKHeX.Core/PKM/Searching/SearchSettings.cs index bd05d8d73..85d591924 100644 --- a/PKHeX.Core/PKM/Searching/SearchSettings.cs +++ b/PKHeX.Core/PKM/Searching/SearchSettings.cs @@ -163,7 +163,7 @@ private bool SearchIntermediate(PKM pk) private bool SearchComplex(PKM pk) { if (SearchEgg != null && !FilterResultEgg(pk)) return false; - if (Level is not null or 0 && !SearchUtil.SatisfiesFilterLevel(pk, SearchLevel, (int) Level)) return false; + if (Level is not (null or 0) && !SearchUtil.SatisfiesFilterLevel(pk, SearchLevel, (int) Level)) return false; if (SearchLegal != null && new LegalityAnalysis(pk).Valid != SearchLegal) return false; if (BatchFilters.Length != 0 && !SearchUtil.SatisfiesFilterBatchInstruction(pk, BatchFilters)) return false; diff --git a/PKHeX.Core/Saves/SAV1.cs b/PKHeX.Core/Saves/SAV1.cs index f31f31f8e..a6591232c 100644 --- a/PKHeX.Core/Saves/SAV1.cs +++ b/PKHeX.Core/Saves/SAV1.cs @@ -51,7 +51,7 @@ public SAV1(byte[] data, GameVersion versionOverride = GameVersion.Any) : base(d private void Initialize(GameVersion versionOverride) { // see if RBY can be differentiated - if (Starter != 0 && versionOverride is not GameVersion.RB or GameVersion.YW) + if (Starter != 0 && versionOverride is not (GameVersion.RB or GameVersion.YW)) Version = Yellow ? GameVersion.YW : GameVersion.RB; Box = Data.Length;