Fix flawless IV count check

#2506 trapinch
This commit is contained in:
Kurt 2019-11-23 14:46:09 -08:00
parent 66ebf7cb60
commit cccf2a1939

View File

@ -26,7 +26,8 @@ public EncounterStatic8N(byte nestID, uint minRank, uint maxRank, byte val)
NestID = nestID;
MinRank = minRank;
MaxRank = maxRank;
DynamaxLevel = val;
DynamaxLevel = (byte)(MinRank + 1u);
FlawlessIVCount = val;
}
private readonly int[] LevelCaps =
@ -63,7 +64,7 @@ public override bool IsMatch(PKM pkm, int lvl)
if (pkm is IDynamaxLevel d && d.DynamaxLevel < DynamaxLevel)
return false;
if (pkm.FlawlessIVCount < MinRank + 1)
if (pkm.FlawlessIVCount < FlawlessIVCount)
return false;
if (Version != GameVersion.SWSH && pkm.Version != (int) Version && pkm.Met_Location != OnlineNest)