2020-01-04 19:44:16 +00:00
|
|
|
|
using static PKHeX.Core.Encounters8Nest;
|
2019-11-24 06:23:43 +00:00
|
|
|
|
|
|
|
|
|
namespace PKHeX.Core
|
2019-11-19 03:23:01 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Generation 8 Nest Encounter (Distributed Data)
|
|
|
|
|
/// </summary>
|
2020-01-04 19:44:16 +00:00
|
|
|
|
public sealed class EncounterStatic8ND : EncounterStatic8Nest<EncounterStatic8ND>
|
2019-11-19 03:23:01 +00:00
|
|
|
|
{
|
2019-11-24 06:23:43 +00:00
|
|
|
|
public EncounterStatic8ND(byte lvl, byte dyna, byte flawless)
|
|
|
|
|
{
|
|
|
|
|
Level = lvl;
|
|
|
|
|
DynamaxLevel = dyna;
|
|
|
|
|
FlawlessIVCount = flawless;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override bool IsMatchLocation(PKM pkm)
|
|
|
|
|
{
|
|
|
|
|
var loc = pkm.Met_Location;
|
2020-06-22 15:07:50 +00:00
|
|
|
|
return loc == SharedNest || EncounterArea8.IsWildArea8(loc) || EncounterArea8.IsWildArea8Armor(loc);
|
2019-11-24 06:23:43 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-21 23:35:49 +00:00
|
|
|
|
public override bool IsMatch(PKM pkm, DexLevel evo)
|
2019-11-19 03:23:01 +00:00
|
|
|
|
{
|
2019-11-24 06:23:43 +00:00
|
|
|
|
if (pkm.FlawlessIVCount < FlawlessIVCount)
|
|
|
|
|
return false;
|
|
|
|
|
|
2020-08-21 23:35:49 +00:00
|
|
|
|
return base.IsMatch(pkm, evo);
|
2019-11-19 03:23:01 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-22 15:07:50 +00:00
|
|
|
|
}
|