2025-07-05 18:27:42 +02:00

67 lines
2.1 KiB
C#

namespace PkmnLib.Static;
/// <summary>
/// Stats are numerical values on Pokémon that are used in battle.
/// </summary>
public enum Statistic : byte
{
/// <summary>
/// Health Points determine how much damage a Pokémon can receive before fainting.
/// </summary>
Hp,
/// <summary>
/// Attack determines how much damage a Pokémon deals when using a physical attack.
/// </summary>
Attack,
/// <summary>
/// Defense determines how much damage a Pokémon receives when it is hit by a physical attack.
/// </summary>
Defense,
/// <summary>
/// Special Attack determines how much damage a Pokémon deals when using a special attack.
/// </summary>
SpecialAttack,
/// <summary>
/// Special Defense determines how much damage a Pokémon receives when it is hit by a special attack.
/// </summary>
SpecialDefense,
/// <summary>
/// Speed determines the order that a Pokémon can act in battle.
/// </summary>
Speed,
/// <summary>
/// Evasion determines the likelihood that a Pokémon will dodge an attack.
/// This is not part of base stats, but is a temporary stat boost.
/// </summary>
Evasion,
/// <summary>
/// Accuracy determines the likelihood that a Pokémon will hit an attack.
/// This is not part of base stats, but is a temporary stat boost.
/// </summary>
Accuracy,
}
/// <summary>
/// Helper class for <see cref="Statistic"/>.
/// </summary>
public static class StatisticHelper
{
/// <summary>
/// Gets all statistics that are defined in the game, including Evasion and Accuracy.
/// </summary>
public static IEnumerable<Statistic> GetAllStatistics() => Enum.GetValues(typeof(Statistic)).Cast<Statistic>();
/// <summary>
/// Gets the standard statistics that are visible in the Pokémon's base stats. Excludes Evasion and Accuracy.s
/// </summary>
public static IEnumerable<Statistic> GetStandardStatistics() =>
Enum.GetValues(typeof(Statistic)).Cast<Statistic>()
.Where(stat => stat != Statistic.Evasion && stat != Statistic.Accuracy);
}