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