using System; using System.Collections.Generic; namespace PKHeX.Core { /// /// Represents an Area where can be encountered, which contains a Location ID and data. /// public abstract class EncounterArea : IVersion { public GameVersion Version { get; } public int Location { get; protected set; } public SlotType Type { get; protected set; } = SlotType.Any; public EncounterSlot[] Slots = Array.Empty(); protected EncounterArea(GameVersion game) => Version = game; /// /// Gets the slots contained in the area that match the provided data. /// /// Pokémon Data /// Evolution lineage /// Enumerable list of encounters public abstract IEnumerable GetMatchingSlots(PKM pkm, IReadOnlyList chain); /// /// Checks if the provided met location ID matches the parameters for the area. /// /// Met Location ID /// True if possibly originated from this area, false otherwise. public virtual bool IsMatchLocation(int location) => Location == location; } }