mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-28 05:13:13 +00:00
68e6644d40
use generics to have shared logic in one spot Handle downleveled distribution/crystal(soon?) data
31 lines
No EOL
843 B
C#
31 lines
No EOL
843 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.IsWildArea8(loc);
|
|
}
|
|
|
|
public override bool IsMatch(PKM pkm, int lvl)
|
|
{
|
|
if (pkm.FlawlessIVCount < FlawlessIVCount)
|
|
return false;
|
|
|
|
return base.IsMatch(pkm, lvl);
|
|
}
|
|
}
|
|
} |