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