using PkmnLib.Static.Utils; namespace PkmnLib.Static.Species; /// /// An ability is a passive effect in battle that is attached to a Pokémon. /// public interface IAbility : INamedValue { /// /// The name of the script effect of the ability. This should refer to the name of the script that will be executed /// when the ability is triggered. /// StringKey? Effect { get; } /// /// The parameters for the script effect of the ability. /// IReadOnlyDictionary Parameters { get; } } /// public class AbilityImpl : IAbility { /// public AbilityImpl(StringKey name, StringKey? effect, IReadOnlyDictionary parameters) { Name = name; Effect = effect; Parameters = parameters; } /// public StringKey Name { get; } /// public StringKey? Effect { get; } /// public IReadOnlyDictionary Parameters { get; } } /// /// An ability index allows us to find an ability on a form. It combines a bool for whether the /// ability is hidden or not, and then an index of the ability. /// public readonly record struct AbilityIndex { /// /// Whether the ability we're referring to is a hidden ability. /// public required bool IsHidden { get; init; } /// /// The index of the ability. /// public required byte Index { get; init; } }