PkmnLib.NET/PkmnLib.Dynamic/Events/AbilityTriggerEvent.cs
2025-06-07 11:03:48 +02:00

30 lines
769 B
C#

using PkmnLib.Dynamic.Models;
using PkmnLib.Static.Species;
namespace PkmnLib.Dynamic.Events;
/// <summary>
/// AbilityTriggerEvent is triggered when a Pokémon's ability is activated.
/// </summary>
public record AbilityTriggerEvent : IEventData
{
/// <summary>
/// The Pokémon whose ability is being triggered.
/// </summary>
public IPokemon Pokemon { get; }
/// <summary>
/// The ability that is being triggered for the Pokémon.
/// </summary>
public IAbility? Ability { get; }
/// <inheritdoc cref="AbilityTriggerEvent"/>
public AbilityTriggerEvent(IPokemon pokemon)
{
Pokemon = pokemon;
Ability = pokemon.ActiveAbility;
}
/// <inheritdoc />
public EventBatchId BatchId { get; init; }
}