Initial set up for item use

This commit is contained in:
2025-01-10 11:11:50 +01:00
parent 85ea31f7cd
commit 0518499a4c
23 changed files with 305 additions and 59 deletions

View File

@@ -8,19 +8,40 @@ namespace PkmnLib.Dynamic.Models.Choices;
/// </summary>
public interface IItemChoice : ITurnChoice
{
/// <summary>
/// The item that is used.
/// </summary>
public IItem Item { get; }
/// <summary>
/// The side the move is targeted at.
/// </summary>
byte? TargetSide { get; }
/// <summary>
/// The position the move is targeted at.
/// </summary>
byte? TargetPosition { get; }
}
/// <inheritdoc cref="IItemChoice"/>
public class ItemChoice : TurnChoice, IItemChoice
{
public ItemChoice(IPokemon user, IItem item) : base(user)
public ItemChoice(IPokemon user, IItem item, byte? targetSide, byte? targetPosition) : base(user)
{
Item = item;
TargetSide = targetSide;
TargetPosition = targetPosition;
}
public IItem Item { get; }
/// <inheritdoc />
public byte? TargetSide { get; }
/// <inheritdoc />
public byte? TargetPosition { get; }
/// <inheritdoc />
public override int ScriptCount => User.ScriptCount;