This commit is contained in:
36
PkmnLib.Dynamic/Events/StatusChangeEvent.cs
Normal file
36
PkmnLib.Dynamic/Events/StatusChangeEvent.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user