2020-10-24 18:16:01 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace PKHeX.Core
|
2019-11-19 03:23:01 +00:00
|
|
|
|
{
|
2020-10-24 18:16:01 +00:00
|
|
|
|
public class EncounterStatic8 : EncounterStatic, IDynamaxLevel, IGigantamax, IRelearn
|
2019-11-19 03:23:01 +00:00
|
|
|
|
{
|
2020-09-07 20:51:13 +00:00
|
|
|
|
public sealed override int Generation => 8;
|
2020-08-30 23:10:24 +00:00
|
|
|
|
public bool CanGigantamax { get; set; }
|
2020-10-24 18:16:01 +00:00
|
|
|
|
public byte DynamaxLevel { get; set; }
|
2020-08-30 23:10:24 +00:00
|
|
|
|
|
2020-08-21 23:35:49 +00:00
|
|
|
|
protected override bool IsMatchLevel(PKM pkm, DexLevel evo)
|
2019-11-19 03:23:01 +00:00
|
|
|
|
{
|
2020-08-21 23:35:49 +00:00
|
|
|
|
var met = pkm.Met_Level;
|
|
|
|
|
if (met == Level)
|
2019-11-19 03:23:01 +00:00
|
|
|
|
return true;
|
2020-10-24 18:16:01 +00:00
|
|
|
|
if (EncounterArea8.IsBoostedArea60(Location))
|
2020-08-21 23:35:49 +00:00
|
|
|
|
return met == 60;
|
2019-11-19 03:23:01 +00:00
|
|
|
|
return false;
|
|
|
|
|
}
|
2020-10-24 18:16:01 +00:00
|
|
|
|
|
|
|
|
|
public override bool IsMatch(PKM pkm, DexLevel evo)
|
|
|
|
|
{
|
|
|
|
|
if (pkm is IDynamaxLevel d && d.DynamaxLevel < DynamaxLevel)
|
|
|
|
|
return false;
|
|
|
|
|
return base.IsMatch(pkm, evo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IReadOnlyList<int> Relearn { get; internal set; } = Array.Empty<int>();
|
2019-11-19 03:23:01 +00:00
|
|
|
|
}
|
2020-10-24 18:16:01 +00:00
|
|
|
|
}
|