PkmnLib.NET/PkmnLib.Dynamic/Events/ExperienceGainEvent.cs
2025-05-03 14:18:12 +02:00

35 lines
972 B
C#

using PkmnLib.Dynamic.Models;
namespace PkmnLib.Dynamic.Events;
/// <summary>
/// Represents an event that occurs when a Pokémon gains experience.
/// </summary>
public class ExperienceGainEvent : IEventData
{
/// <inheritdoc cref="ExperienceGainEvent"/>
public ExperienceGainEvent(IPokemon pokemon, uint previousExperience, uint newExperience)
{
Pokemon = pokemon;
PreviousExperience = previousExperience;
NewExperience = newExperience;
}
/// <summary>
/// The Pokémon that gained experience.
/// </summary>
public IPokemon Pokemon { get; set; }
/// <summary>
/// The amount of experience the Pokémon had before the gain.
/// </summary>
public uint PreviousExperience { get; }
/// <summary>
/// The amount of experience the Pokémon has after the gain.
/// </summary>
public uint NewExperience { get; }
/// <inheritdoc />
public EventBatchId BatchId { get; init; }
}