36 lines
971 B
C#
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; }
|
|
} |