2025-05-03 14:18:12 +02:00

35 lines
923 B
C#

using PkmnLib.Dynamic.Models;
namespace PkmnLib.Dynamic.Events;
/// <summary>
/// Represents an event that occurs when a Pokémon gains enough experience points to level up.
/// </summary>
public class LevelUpEvent : IEventData
{
/// <inheritdoc cref="LevelUpEvent"/>
public LevelUpEvent(IPokemon pokemon, int previousLevel, int newLevel)
{
Pokemon = pokemon;
PreviousLevel = previousLevel;
NewLevel = newLevel;
}
/// <summary>
/// The new level of the Pokémon after leveling up.
/// </summary>
public int NewLevel { get; set; }
/// <summary>
/// The previous level of the Pokémon before leveling up.
/// </summary>
public int PreviousLevel { get; set; }
/// <summary>
/// The Pokémon that leveled up.
/// </summary>
public IPokemon Pokemon { get; set; }
/// <inheritdoc />
public EventBatchId BatchId { get; init; }
}