PKHeX/PKHeX.Core/Legality/RNG/CXD/TeamLock.cs
Kurt d47bb1d297
Update .NET Runtime to .NET 8.0 (#4082)
With the new version of Visual Studio bringing C# 12, we can revise our logic for better readability as well as use new methods/APIs introduced in the .NET 8.0 BCL.
2023-12-03 20:13:20 -08:00

66 lines
1.8 KiB
C#

namespace PKHeX.Core;
/// <summary>
/// Represents a Team of Pokémon that is generated before a shadow <see cref="Species"/>.
/// </summary>
public sealed class TeamLock(ushort Species, NPCLockDetail Comment, NPCLock[] Locks)
{
/// <summary>
/// Team generated before the Species.
/// </summary>
public readonly NPCLock[] Locks = Locks;
/// <summary>
/// For trainers that have different teams, this indicates what conditions (when/where) the trainer must be battled.
/// </summary>
public readonly NPCLockDetail Comment = Comment;
/// <summary>
/// Species of shadow Pokémon that is generated after the <see cref="Locks"/>.
/// </summary>
public readonly ushort Species = Species;
public TeamLock(ushort Species, NPCLock[] Locks) : this(Species, 0, Locks) { }
public override string ToString()
{
if (Comment == 0)
return $"{(Species)Species} [{Locks.Length}]";
return $"{(Species)Species} [{Locks.Length}] - {Comment}";
}
}
public enum NPCLockDetail : byte
{
CipherLab,
Post,
PhenacCity,
PhenacCityAndPost,
SeenParas,
SeenBeedrill,
SeenTangela,
SeenVenomoth,
SeenPrimeape,
SeenGolduck,
SeenDodrio,
SeenFarfetchd,
SeenKangaskhan,
SeenMagmar,
SeenRapidash,
SeenScyther,
SeenSolrock,
SeenSwellow,
SeenSwellowElectabuzz,
SeenPoliwrath,
SeenManectric,
SeenManectricSalamence,
SeenManectricMarowak,
SeenManectricMarowakSalamence,
SeenRhydonMoltres,
SeenRhydonMoltresExeggutor,
SeenRhydonMoltresTauros,
SeenRhydonMoltresArticuno,
SeenRhydonMoltresTaurosArticuno,
SeenRhydonMoltresExeggutorTauros,
SeenRhydonMoltresExeggutorArticuno,
SeenRhydonMoltresExeggutorTaurosArticuno,
}