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

37 lines
996 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(IBattlePokemon target, CaptureResult result, IItem captureItem)
{
Target = target;
Result = result;
CaptureItem = captureItem;
}
/// <summary>
/// The Pokémon that is being captured.
/// </summary>
public IBattlePokemon 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; }
}