PKHeX/PKHeX.Core/Game/Enums/Ball.cs
Kurt 1174e354b1
Initial support for Pokémon HOME 3.0.0 (#3899)
* Heavily rewrites the `PKH` abstractions.
* Uses HOME's core-side classes as the transfer middlemen instead of direct A->B transfers.
* Revises logic to account for most of HOME's quirks (scale/height copying, safe refuge PLA)

Future revisions hinge on better handling of evotree (need better metadata about existing as specific evolutions in each game).

---------

Co-authored-by: sora10pls <17801814+sora10pls@users.noreply.github.com>
Co-authored-by: Lusamine <30205550+Lusamine@users.noreply.github.com>
2023-06-03 18:19:16 -07:00

69 lines
1.3 KiB
C#

namespace PKHeX.Core;
/// <summary>
/// Ball IDs for the corresponding English ball name.
/// </summary>
public enum Ball : byte
{
None = 0,
Master = 1,
Ultra = 2,
Great = 3,
Poke = 4,
Safari = 5,
Net = 6,
Dive = 7,
Nest = 8,
Repeat = 9,
Timer = 10,
Luxury = 11,
Premier = 12,
Dusk = 13,
Heal = 14,
Quick = 15,
Cherish = 16,
Fast = 17,
Level = 18,
Lure = 19,
Heavy = 20,
Love = 21,
Friend = 22,
Moon = 23,
Sport = 24,
Dream = 25,
Beast = 26,
// Legends: Arceus
Strange = 27,
LAPoke = 28,
LAGreat = 29,
LAUltra = 30,
LAFeather = 31,
LAWing = 32,
LAJet = 33,
LAHeavy = 34,
LALeaden = 35,
LAGigaton = 36,
LAOrigin = 37,
}
/// <summary>
/// Extension methods for <see cref="Ball"/>.
/// </summary>
public static class BallExtensions
{
/// <summary>
/// Checks if the <see cref="ball"/> is an Apricorn Ball (HG/SS)
/// </summary>
/// <param name="ball">Ball ID</param>
/// <returns>True if Apricorn, false if not.</returns>
public static bool IsApricornBall(this Ball ball) => ball is >= Ball.Fast and <= Ball.Moon;
public static bool IsLegendBall(this Ball ball) => ball is >= Ball.LAPoke and <= Ball.LAOrigin;
}