PkmnLib.NET/PkmnLib.Dynamic/Events/StatusChangeEvent.cs
Deukhoofd 00005aa4bf
All checks were successful
Build / Build (push) Successful in 47s
Implements more abilities
2025-06-09 12:10:25 +02:00

36 lines
971 B
C#

using PkmnLib.Dynamic.Models;
using PkmnLib.Static.Utils;
namespace PkmnLib.Dynamic.Events;
/// <summary>
/// Represents an event that occurs when a Pokémon's status changes.
/// </summary>
public record StatusChangeEvent : IEventData
{
/// <inheritdoc cref="StatusChangeEvent"/>
public StatusChangeEvent(IPokemon pokemon, StringKey? previousStatus, StringKey? newStatus)
{
Pokemon = pokemon;
PreviousStatus = previousStatus;
NewStatus = newStatus;
}
/// <summary>
/// The Pokémon whose status has changed.
/// </summary>
public IPokemon Pokemon { get; }
/// <summary>
/// The new status of the Pokémon after the change.
/// </summary>
public StringKey? NewStatus { get; }
/// <summary>
/// The previous status of the Pokémon before the change.
/// </summary>
public StringKey? PreviousStatus { get; }
/// <inheritdoc />
public EventBatchId BatchId { get; init; }
}