25 lines
643 B
C#
25 lines
643 B
C#
using PkmnLib.Dynamic.Models;
|
|
using PkmnLib.Static;
|
|
|
|
namespace PkmnLib.Dynamic.Libraries;
|
|
|
|
public record struct CaptureResult
|
|
{
|
|
public CaptureResult(bool IsCaught, int Shakes, bool CriticalCapture)
|
|
{
|
|
this.IsCaught = IsCaught;
|
|
this.Shakes = Shakes;
|
|
this.CriticalCapture = CriticalCapture;
|
|
}
|
|
|
|
public bool IsCaught { get; init; }
|
|
public int Shakes { get; init; }
|
|
public bool CriticalCapture { get; init; }
|
|
|
|
public static CaptureResult Failed => new(false, 0, false);
|
|
}
|
|
|
|
public interface ICaptureLibrary
|
|
{
|
|
CaptureResult TryCapture(IPokemon target, IItem captureItem, IBattleRandom random);
|
|
} |