using PkmnLib.Dynamic.Models.Choices; using PkmnLib.Dynamic.ScriptHandling; namespace PkmnLib.Dynamic.Models; /// /// A side in a battle. /// public interface IBattleSide : IScriptSource { /// /// The index of the side on the battle. /// byte Index { get; } /// /// The number of Pokémon that can be on the side. /// byte NumberOfPositions { get; } /// /// A list of Pokémon currently on the battlefield. /// IReadOnlyList Pokemon { get; } /// /// The currently set choices for all Pokémon on the battlefield. Cleared when the turn starts. /// IReadOnlyList SetChoices { get; } /// /// Whether every Pokémon on this side has its choices /// bool AllChoicesSet { get; } /// /// The slots on the side that can still be filled. Once all slots are set to false, this side /// has lost the battle. /// IReadOnlyList FillablePositions { get; } /// /// A reference to the battle this side is in. /// IBattle Battle { get; } /// /// Whether this side has fled. /// bool HasFledBattle { get; } /// /// The volatile scripts that are attached to the side. /// IScriptSet VolatileScripts { get; } /// /// Returns true if there are slots that need to be filled with a new pokemon, that have parties /// responsible for them. Returns false if all slots are filled with usable pokemon, or slots are /// empty, but can't be filled by any party anymore. /// void AllPositionsFilled(); /// /// Sets a choice for a Pokémon on this side. /// void SetChoice(byte position, ITurnChoice choice); /// /// Resets all choices on this side. /// void ResetChoices(); /// /// Forcibly removes a Pokémon from the field. /// void ForceClearPokemonFromField(); /// /// Switches out a spot on the field for a different Pokémon. If null is passed, the spot is /// cleared. Returns the Pokémon that was previously in the spot. /// IPokemon? SwapPokemon(byte position, IPokemon? pokemon); /// /// Swaps two Pokémon on the side. /// void SwapPokemon(byte position1, byte position2); /// /// Checks whether a Pokemon is on the field in this side. /// bool IsPokemonOnSide(IPokemon pokemon); /// /// Marks a slot as unfillable. This happens when no parties are able to fill the slot anymore. /// If this happens, the slot can not be used again. /// void MarkPositionAsUnfillable(byte position); /// /// Checks whether a slot is fillable. If it is not, the slot can not be used anymore. /// bool IsPositionFillable(byte position); /// /// Checks whether the side has been defeated. /// bool IsDefeated(); /// /// Mark the side as fled. /// void MarkAsFled(); /// /// Gets a random Pokémon on the given side. /// byte GetRandomPosition(); }