using PkmnLib.Dynamic.ScriptHandling; namespace PkmnLib.Dynamic.Models.Choices; /// /// The choice of a Pokémon to use a move. /// public interface IMoveChoice : ITurnChoice { /// /// The move that is used. /// ILearnedMove UsedMove { get; } /// /// The side the move is targeted at. /// byte TargetSide { get; } /// /// The position the move is targeted at. /// byte TargetPosition { get; } /// /// The priority of the move. /// sbyte Priority { get; set; } /// /// The underlying script of the move. /// ScriptContainer Script { get; set; } } /// public class MoveChoice : TurnChoice, IMoveChoice { /// public MoveChoice(IPokemon user, ILearnedMove usedMove, byte targetSide, byte targetPosition) : base(user) { UsedMove = usedMove; TargetSide = targetSide; TargetPosition = targetPosition; } /// public ILearnedMove UsedMove { get; } /// public byte TargetSide { get; } /// public byte TargetPosition { get; } /// public sbyte Priority { get; set; } /// public ScriptContainer Script { get; set; } = new(); /// public override int ScriptCount => 1 + User.ScriptCount; /// public override void GetOwnScripts(List> scripts) => scripts.Add(Script); /// public override void CollectScripts(List> scripts) { GetOwnScripts(scripts); User.CollectScripts(scripts); } }