Style cleanup
This commit is contained in:
@@ -14,48 +14,48 @@ public interface IBattleSide : IScriptSource, IDeepCloneable
|
||||
/// The index of the side on the battle.
|
||||
/// </summary>
|
||||
byte Index { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The number of Pokémon that can be on the side.
|
||||
/// </summary>
|
||||
byte NumberOfPositions { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A list of Pokémon currently on the battlefield.
|
||||
/// </summary>
|
||||
IReadOnlyList<IPokemon?> Pokemon { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The currently set choices for all Pokémon on the battlefield. Cleared when the turn starts.
|
||||
/// </summary>
|
||||
IReadOnlyList<ITurnChoice?> SetChoices { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Whether every Pokémon on this side has its choices
|
||||
/// </summary>
|
||||
bool AllChoicesSet { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The slots on the side that can still be filled. Once all slots are set to false, this side
|
||||
/// has lost the battle.
|
||||
/// </summary>
|
||||
IReadOnlyList<bool> FillablePositions { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A reference to the battle this side is in.
|
||||
/// </summary>
|
||||
IBattle Battle { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Whether this side has fled.
|
||||
/// </summary>
|
||||
bool HasFledBattle { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The volatile scripts that are attached to the side.
|
||||
/// </summary>
|
||||
IScriptSet VolatileScripts { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
@@ -67,7 +67,7 @@ public interface IBattleSide : IScriptSource, IDeepCloneable
|
||||
/// Sets a choice for a Pokémon on this side.
|
||||
/// </summary>
|
||||
void SetChoice(byte position, ITurnChoice choice);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Resets all choices on this side.
|
||||
/// </summary>
|
||||
@@ -110,12 +110,12 @@ public interface IBattleSide : IScriptSource, IDeepCloneable
|
||||
/// Checks whether the side has been defeated.
|
||||
/// </summary>
|
||||
bool IsDefeated();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The number of times this side has attempted to flee.
|
||||
/// </summary>
|
||||
uint FleeAttempts { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Registers a flee attempt for this side.
|
||||
/// </summary>
|
||||
@@ -150,7 +150,7 @@ public class BattleSideImpl : ScriptSource, IBattleSide
|
||||
Battle = battle;
|
||||
VolatileScripts = new ScriptSet();
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public byte Index { get; }
|
||||
|
||||
@@ -158,6 +158,7 @@ public class BattleSideImpl : ScriptSource, IBattleSide
|
||||
public byte NumberOfPositions { get; }
|
||||
|
||||
private readonly IPokemon?[] _pokemon;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyList<IPokemon?> Pokemon => _pokemon;
|
||||
|
||||
@@ -170,6 +171,7 @@ public class BattleSideImpl : ScriptSource, IBattleSide
|
||||
public bool AllChoicesSet => _setChoices.All(choice => choice is not null);
|
||||
|
||||
private readonly bool[] _fillablePositions;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyList<bool> FillablePositions => _fillablePositions;
|
||||
|
||||
@@ -223,7 +225,7 @@ public class BattleSideImpl : ScriptSource, IBattleSide
|
||||
pokemon.RunScriptHook(script => script.OnRemove());
|
||||
pokemon.SetOnBattlefield(false);
|
||||
}
|
||||
|
||||
|
||||
_pokemon[index] = null;
|
||||
}
|
||||
|
||||
@@ -259,7 +261,7 @@ public class BattleSideImpl : ScriptSource, IBattleSide
|
||||
{
|
||||
Battle.EventHook.Invoke(new SwitchEvent(Index, position, null));
|
||||
}
|
||||
|
||||
|
||||
return oldPokemon;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user