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-11-27 19:51:02 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Generation 8 Static Encounter
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <inheritdoc cref="EncounterStatic"/>
|
2020-12-24 04:40:59 +00:00
|
|
|
|
public record 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-12-22 07:37:07 +00:00
|
|
|
|
public bool ScriptedNoMarks { get; init; }
|
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;
|
2020-11-06 05:17:13 +00:00
|
|
|
|
var lvl = Level;
|
|
|
|
|
if (met == lvl)
|
2019-11-19 03:23:01 +00:00
|
|
|
|
return true;
|
2020-11-06 05:17:13 +00:00
|
|
|
|
if (lvl < 60 && 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);
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-22 01:48:08 +00:00
|
|
|
|
public IReadOnlyList<int> Relearn { get; init; } = Array.Empty<int>();
|
2019-11-19 03:23:01 +00:00
|
|
|
|
}
|
2020-10-24 18:16:01 +00:00
|
|
|
|
}
|