PKHeX/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic8S.cs

18 lines
630 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
namespace PKHeX.Core
{
/// <summary>
/// <see cref="EncounterStatic8"/> with multiple references (used for multiple met locations)
/// </summary>
/// <inheritdoc cref="EncounterStatic"/>
2021-12-10 03:30:12 +00:00
public sealed record EncounterStatic8S(GameVersion Version) : EncounterStatic8(Version)
{
2020-12-22 01:05:05 +00:00
public override int Location { get => Locations[0]; init { } }
public IReadOnlyList<int> Locations { get; init; } = Array.Empty<int>();
protected override bool IsMatchLocation(PKM pkm) => Locations.Contains(pkm.Met_Location);
}
}