PKHeX/PKHeX.Core/Legality/Encounters/EncounterSlot/EncounterSlot5.cs
Kurt 4e1276a954 -8 bytes from each encounter template
saves about ~1MB RAM savings (>=179,142 objects)
2022-03-06 23:25:47 -08:00

19 lines
692 B
C#

namespace PKHeX.Core
{
/// <summary>
/// Encounter Slot found in <see cref="GameVersion.Gen5"/>.
/// </summary>
/// <inheritdoc cref="EncounterSlot"/>
public sealed record EncounterSlot5 : EncounterSlot
{
public override int Generation => 5;
public EncounterSlot5(EncounterArea5 area, ushort species, byte form, byte min, byte max) : base(area, species, form, min, max)
{
}
public bool IsHiddenGrotto => Area.Type == SlotType.HiddenGrotto;
protected override HiddenAbilityPermission IsHiddenAbilitySlot() => Area.Type == SlotType.HiddenGrotto ? HiddenAbilityPermission.Always : HiddenAbilityPermission.Never;
}
}