2020-01-04 11:44:16 -08:00
|
|
|
|
using static PKHeX.Core.Encounters8Nest;
|
2019-11-23 22:23:43 -08:00
|
|
|
|
|
|
|
|
|
namespace PKHeX.Core
|
2019-11-18 19:23:01 -08:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Generation 8 Nest Encounter (Distributed Data)
|
|
|
|
|
/// </summary>
|
2020-11-27 11:51:02 -08:00
|
|
|
|
/// <inheritdoc cref="EncounterStatic8Nest{T}"/>
|
2020-01-04 11:44:16 -08:00
|
|
|
|
public sealed class EncounterStatic8ND : EncounterStatic8Nest<EncounterStatic8ND>
|
2019-11-18 19:23:01 -08:00
|
|
|
|
{
|
2019-11-23 22:23:43 -08: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-10-24 11:16:01 -07:00
|
|
|
|
return loc == SharedNest || EncounterArea8.IsWildArea(loc);
|
2019-11-23 22:23:43 -08:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-21 16:35:49 -07:00
|
|
|
|
public override bool IsMatch(PKM pkm, DexLevel evo)
|
2019-11-18 19:23:01 -08:00
|
|
|
|
{
|
2019-11-23 22:23:43 -08:00
|
|
|
|
if (pkm.FlawlessIVCount < FlawlessIVCount)
|
|
|
|
|
return false;
|
|
|
|
|
|
2020-08-21 16:35:49 -07:00
|
|
|
|
return base.IsMatch(pkm, evo);
|
2019-11-18 19:23:01 -08:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-22 11:07:50 -04:00
|
|
|
|
}
|