PkmnLib.NET/PkmnLib.Dynamic/Events/CaptureAttemptEvent.cs
Deukhoofd a5675024a4
All checks were successful
Build / Build (push) Successful in 1m34s
Tweaks and fixes for Pokemon capture
2025-08-03 12:00:20 +02:00

37 lines
984 B
C#

using PkmnLib.Dynamic.Libraries;
using PkmnLib.Dynamic.Models;
using PkmnLib.Static;
namespace PkmnLib.Dynamic.Events;
/// <summary>
/// Represents an event that occurs when a Pokémon capture attempt is made.
/// </summary>
public class CaptureAttemptEvent : IEventData
{
/// <inheritdoc cref="CaptureAttemptEvent"/>
public CaptureAttemptEvent(IPokemon target, CaptureResult result, IItem captureItem)
{
Target = target;
Result = result;
CaptureItem = captureItem;
}
/// <summary>
/// The Pokémon that is being captured.
/// </summary>
public IPokemon Target { get; init; }
/// <summary>
/// The result of the capture attempt.
/// </summary>
public CaptureResult Result { get; init; }
/// <summary>
/// The item used to attempt the capture (e.g., a Poké Ball).
/// </summary>
public IItem CaptureItem { get; init; }
/// <inheritdoc />
public EventBatchId BatchId { get; init; }
}