mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-24 04:53:08 +00:00
2e4af1afc5
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com> Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
31 lines
848 B
C#
31 lines
848 B
C#
using static PKHeX.Core.Encounters8Nest;
|
|
|
|
namespace PKHeX.Core
|
|
{
|
|
/// <summary>
|
|
/// Generation 8 Nest Encounter (Distributed Data)
|
|
/// </summary>
|
|
public sealed class EncounterStatic8ND : EncounterStatic8Nest<EncounterStatic8ND>
|
|
{
|
|
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;
|
|
return loc == SharedNest || EncounterArea8.IsWildArea(loc);
|
|
}
|
|
|
|
public override bool IsMatch(PKM pkm, DexLevel evo)
|
|
{
|
|
if (pkm.FlawlessIVCount < FlawlessIVCount)
|
|
return false;
|
|
|
|
return base.IsMatch(pkm, evo);
|
|
}
|
|
}
|
|
}
|