Style cleanup
This commit is contained in:
@@ -12,22 +12,22 @@ public interface IBattleStatCalculator
|
||||
/// Calculate all the flat stats of a Pokemon, disregarding stat boosts.
|
||||
/// </summary>
|
||||
void CalculateFlatStats(IPokemon pokemon, StatisticSet<uint> stats);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Calculate a single flat stat of a Pokemon, disregarding stat boosts.
|
||||
/// </summary>
|
||||
uint CalculateFlatStat(IPokemon pokemon, Statistic stat);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Calculate all the boosted stats of a Pokemon, including stat boosts.
|
||||
/// </summary>
|
||||
void CalculateBoostedStats(IPokemon pokemon, StatisticSet<uint> stats);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Calculate a single boosted stat of a Pokemon, including stat boosts.
|
||||
/// </summary>
|
||||
uint CalculateBoostedStat(IPokemon pokemon, Statistic stat);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the accuracy for a move, taking into account any accuracy modifiers.
|
||||
/// </summary>
|
||||
|
||||
@@ -15,8 +15,8 @@ public record struct CaptureResult
|
||||
public bool IsCaught { get; init; }
|
||||
public int Shakes { get; init; }
|
||||
public bool CriticalCapture { get; init; }
|
||||
|
||||
public static CaptureResult Failed => new CaptureResult(false, 0, false);
|
||||
|
||||
public static CaptureResult Failed => new(false, 0, false);
|
||||
}
|
||||
|
||||
public interface ICaptureLibrary
|
||||
|
||||
@@ -31,12 +31,12 @@ public interface IDynamicLibrary
|
||||
/// calculators.
|
||||
/// </summary>
|
||||
IMiscLibrary MiscLibrary { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The capture library deals with the calculation of the capture rate of a Pokémon.
|
||||
/// </summary>
|
||||
ICaptureLibrary CaptureLibrary { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A holder of the script types that can be resolved by this library.
|
||||
/// </summary>
|
||||
@@ -66,12 +66,13 @@ public class DynamicLibraryImpl : IDynamicLibrary
|
||||
if (registry.CaptureLibrary is null)
|
||||
throw new InvalidOperationException("Capture library not found in plugins.");
|
||||
var scriptResolver = new ScriptResolver(registry.ScriptTypes, registry.ItemScriptTypes);
|
||||
return new DynamicLibraryImpl(staticLibrary, registry.BattleStatCalculator,
|
||||
registry.DamageCalculator, registry.MiscLibrary, registry.CaptureLibrary, scriptResolver);
|
||||
return new DynamicLibraryImpl(staticLibrary, registry.BattleStatCalculator, registry.DamageCalculator,
|
||||
registry.MiscLibrary, registry.CaptureLibrary, scriptResolver);
|
||||
}
|
||||
|
||||
|
||||
private DynamicLibraryImpl(IStaticLibrary staticLibrary, IBattleStatCalculator statCalculator,
|
||||
IDamageCalculator damageCalculator, IMiscLibrary miscLibrary, ICaptureLibrary captureLibrary, ScriptResolver scriptResolver)
|
||||
IDamageCalculator damageCalculator, IMiscLibrary miscLibrary, ICaptureLibrary captureLibrary,
|
||||
ScriptResolver scriptResolver)
|
||||
{
|
||||
StaticLibrary = staticLibrary;
|
||||
StatCalculator = statCalculator;
|
||||
|
||||
@@ -14,7 +14,7 @@ public interface IMiscLibrary
|
||||
/// moves left, yet wants to make a move.
|
||||
/// </summary>
|
||||
ITurnChoice ReplacementChoice(IPokemon user, byte targetSide, byte targetPosition);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current time of day for the battle.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user