33 lines
873 B
C#
33 lines
873 B
C#
using PkmnLib.Dynamic.Models;
|
|
using PkmnLib.Static.Species;
|
|
using PkmnLib.Static.Utils;
|
|
|
|
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; }
|
|
|
|
public Dictionary<StringKey, object?>? Metadata { get; init; } = null;
|
|
|
|
/// <inheritdoc cref="AbilityTriggerEvent"/>
|
|
public AbilityTriggerEvent(IPokemon pokemon)
|
|
{
|
|
Pokemon = pokemon;
|
|
Ability = pokemon.ActiveAbility;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public EventBatchId BatchId { get; init; }
|
|
} |