mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-22 20:13:06 +00:00
Merge extended property patterns
This commit is contained in:
parent
88ddc5822e
commit
40ed5898af
4 changed files with 4 additions and 4 deletions
|
@ -373,7 +373,7 @@ namespace PKHeX.Core
|
|||
IEnumerable<int> 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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue