Files
PkmnLib.NET/PkmnLib.Dynamic/Events/FleeEvent.cs

29 lines
773 B
C#

using PkmnLib.Dynamic.Models;
namespace PkmnLib.Dynamic.Events;
/// <summary>
/// Event data for when a Pokémon attempts to flee from battle. Indicates which Pokémon attempted to flee and whether the attempt was successful.
/// </summary>
public class FleeEvent : IEventData
{
/// <inheritdoc cref="FleeEvent"/>
public FleeEvent(IBattlePokemon pokemon, bool success)
{
Pokemon = pokemon;
Success = success;
}
/// <summary>
/// The Pokémon that attempted to flee.
/// </summary>
public IBattlePokemon Pokemon { get; }
/// <summary>
/// Indicates whether the flee attempt was successful.
/// </summary>
public bool Success { get; }
/// <inheritdoc />
public EventBatchId BatchId { get; init; }
}