Add all missing docs
This commit is contained in:
@@ -93,6 +93,10 @@ public interface IBattle : IScriptSource, IDeepCloneable
|
||||
/// </summary>
|
||||
void ValidateBattleState();
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether a Pokemon has a forced turn choice. If it does, this returns true and the choice
|
||||
/// is set in the out parameter. If it does not, this returns false and the out parameter is null.
|
||||
/// </summary>
|
||||
bool HasForcedTurn(IPokemon pokemon, [NotNullWhen(true)] out ITurnChoice? choice);
|
||||
|
||||
/// <summary>
|
||||
@@ -117,6 +121,9 @@ public interface IBattle : IScriptSource, IDeepCloneable
|
||||
/// </summary>
|
||||
bool SetWeather(StringKey? weatherName, int duration);
|
||||
|
||||
/// <summary>
|
||||
/// Volatile scripts are scripts that are not permanent and can be removed by other scripts.
|
||||
/// </summary>
|
||||
public IScriptSet Volatile { get; }
|
||||
|
||||
/// <summary>
|
||||
@@ -124,8 +131,15 @@ public interface IBattle : IScriptSource, IDeepCloneable
|
||||
/// </summary>
|
||||
StringKey? WeatherName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the current terrain for the battle. If null is passed, this clears the terrain.
|
||||
/// </summary>
|
||||
/// <param name="terrainName"></param>
|
||||
void SetTerrain(StringKey? terrainName);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current terrain of the battle. If no terrain is present, this returns null.
|
||||
/// </summary>
|
||||
StringKey? TerrainName { get; }
|
||||
|
||||
/// <summary>
|
||||
@@ -134,6 +148,9 @@ public interface IBattle : IScriptSource, IDeepCloneable
|
||||
/// </summary>
|
||||
IReadOnlyList<IReadOnlyList<ITurnChoice>> PreviousTurnChoices { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to capture a Pokemon. This will use the current RNG to determine whether the capture is successful.
|
||||
/// </summary>
|
||||
CaptureResult AttempCapture(byte sideIndex, byte position, IItem item);
|
||||
}
|
||||
|
||||
@@ -350,7 +367,11 @@ public class BattleImpl : ScriptSource, IBattle
|
||||
EventHook.Invoke(new EndTurnEvent());
|
||||
}
|
||||
|
||||
private ScriptContainer _weatherScript = new();
|
||||
private readonly ScriptContainer _weatherScript = new();
|
||||
|
||||
/// <summary>
|
||||
/// The script that handles the current weather of the battle.
|
||||
/// </summary>
|
||||
public IReadOnlyScriptContainer WeatherScript => _weatherScript;
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -377,6 +398,7 @@ public class BattleImpl : ScriptSource, IBattle
|
||||
// TODO: Trigger weather change script hooks
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public IScriptSet Volatile { get; } = new ScriptSet();
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user