From 40ed5898aff339b775038d4198b20b704235fc6a Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 4 Dec 2021 18:37:47 -0800 Subject: [PATCH] Merge extended property patterns --- .../Encounters/Generator/Moveset/EncounterMovesetGenerator.cs | 2 +- PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs | 2 +- PKHeX.Core/Legality/Restrictions/GBRestrictions.cs | 2 +- PKHeX.Core/Saves/SAV4.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PKHeX.Core/Legality/Encounters/Generator/Moveset/EncounterMovesetGenerator.cs b/PKHeX.Core/Legality/Encounters/Generator/Moveset/EncounterMovesetGenerator.cs index fe322b6ac..fc51a3cec 100644 --- a/PKHeX.Core/Legality/Encounters/Generator/Moveset/EncounterMovesetGenerator.cs +++ b/PKHeX.Core/Legality/Encounters/Generator/Moveset/EncounterMovesetGenerator.cs @@ -373,7 +373,7 @@ namespace PKHeX.Core IEnumerable em = trade.Moves; if (trade.Generation <= 2) em = em.Concat(MoveLevelUp.GetEncounterMoves(trade.Species, 0, trade.Level, trade.Version)); - else if (trade is IRelearn { Relearn: { Count: not 0 } } r) + else if (trade is IRelearn { Relearn.Count: not 0 } r) em = em.Concat(r.Relearn); if (!needs.Except(em).Any()) yield return trade; diff --git a/PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs b/PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs index ddcc429a4..403eb9f79 100644 --- a/PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs +++ b/PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs @@ -146,7 +146,7 @@ namespace PKHeX.Core var games = enc.Generation == 1 ? GBRestrictions.GetGen1Versions(enc) : GBRestrictions.GetGen2Versions(enc, pkm.Korean); foreach (var ver in games) { - var VerInitialMoves = enc is IMoveset {Moves: {Count: not 0}} x ? (int[])x.Moves : MoveLevelUp.GetEncounterMoves(enc.Species, 0, level, ver); + var VerInitialMoves = enc is IMoveset {Moves.Count: not 0 } x ? (int[])x.Moves : MoveLevelUp.GetEncounterMoves(enc.Species, 0, level, ver); if (VerInitialMoves.Intersect(InitialMoves).Count() == VerInitialMoves.Length) return res; diff --git a/PKHeX.Core/Legality/Restrictions/GBRestrictions.cs b/PKHeX.Core/Legality/Restrictions/GBRestrictions.cs index b09150aab..133d1a4a0 100644 --- a/PKHeX.Core/Legality/Restrictions/GBRestrictions.cs +++ b/PKHeX.Core/Legality/Restrictions/GBRestrictions.cs @@ -214,7 +214,7 @@ namespace PKHeX.Core if (capsuleState != TimeCapsuleEvaluation.NotTransferred) // No Move Deleter in Gen 1 return 1; // Move Deleter exits, slots from 2 onwards can always be empty - if (enc is IMoveset {Moves: {Count: 4}}) + if (enc is IMoveset {Moves.Count: 4 }) return 4; int required = GetRequiredMoveCount(pk, moves, info.EncounterMoves.LevelUpMoves, initialmoves, enc.Species); diff --git a/PKHeX.Core/Saves/SAV4.cs b/PKHeX.Core/Saves/SAV4.cs index 7aedfef79..28d390647 100644 --- a/PKHeX.Core/Saves/SAV4.cs +++ b/PKHeX.Core/Saves/SAV4.cs @@ -288,7 +288,7 @@ namespace PKHeX.Core } for (int i = 8; i < 11; i++) // 3 PCD { - if (value[i] is PCD {Gift: {CardType: not 0}}) + if (value[i] is PCD {Gift.CardType: not 0 }) return true; } return false;