Files
PkmnLib.NET/PkmnLib.Dynamic/Events/FleeEvent.cs
Deukhoofd fa05cdd773
All checks were successful
Build / Build (push) Successful in 57s
Fix flee odds being incorrect
2025-11-08 10:32:29 +01:00

29 lines
761 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(IPokemon pokemon, bool success)
{
Pokemon = pokemon;
Success = success;
}
/// <summary>
/// The Pokémon that attempted to flee.
/// </summary>
public IPokemon Pokemon { get; }
/// <summary>
/// Indicates whether the flee attempt was successful.
/// </summary>
public bool Success { get; }
/// <inheritdoc />
public EventBatchId BatchId { get; init; }
}