Add all missing docs
This commit is contained in:
@@ -51,6 +51,7 @@ public record ImmutableStatisticSet<T> where T : struct
|
||||
Speed = speed;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ImmutableStatisticSet{T}"/>
|
||||
public ImmutableStatisticSet(ImmutableStatisticSet<T> set)
|
||||
{
|
||||
Hp = set.Hp;
|
||||
@@ -97,6 +98,7 @@ public record StatisticSet<T> : ImmutableStatisticSet<T>, IEnumerable<(Statistic
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="StatisticSet{T}"/>
|
||||
public StatisticSet(StatisticSet<T> set) : base(set)
|
||||
{
|
||||
}
|
||||
@@ -174,8 +176,16 @@ public record StatisticSet<T> : ImmutableStatisticSet<T>, IEnumerable<(Statistic
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a statistic that is not one of the standard statistics. This can be used for sets where there are
|
||||
/// additional statistics, such as evasion or accuracy.
|
||||
/// </summary>
|
||||
protected virtual T GetUnknownStat(Statistic stat) => throw new ArgumentException($"Invalid statistic {stat}");
|
||||
|
||||
/// <summary>
|
||||
/// Sets a statistic that is not one of the standard statistics. This can be used for sets where there are
|
||||
/// additional statistics, such as evasion or accuracy.
|
||||
/// </summary>
|
||||
protected virtual void SetUnknownStat(Statistic stat, T value)
|
||||
{
|
||||
throw new ArgumentException($"Invalid statistic {stat}");
|
||||
@@ -249,10 +259,14 @@ public abstract record ClampedStatisticSet<T> : StatisticSet<T> where T : struct
|
||||
Speed = Clamp(Speed, Min, Max);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ClampedStatisticSet{T}"/>
|
||||
protected ClampedStatisticSet(ClampedStatisticSet<T> set) : base(set)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clamps a value to be between the minimum and maximum values.
|
||||
/// </summary>
|
||||
protected static T Clamp(T value, T min, T max)
|
||||
{
|
||||
if (value.CompareTo(min) < 0)
|
||||
@@ -314,6 +328,9 @@ public record StatBoostStatisticSet : ClampedStatisticSet<sbyte>
|
||||
|
||||
private sbyte _evasion;
|
||||
|
||||
/// <summary>
|
||||
/// The evasion stat value.
|
||||
/// </summary>
|
||||
public sbyte Evasion
|
||||
{
|
||||
get => _evasion;
|
||||
@@ -322,6 +339,9 @@ public record StatBoostStatisticSet : ClampedStatisticSet<sbyte>
|
||||
|
||||
private sbyte _accuracy;
|
||||
|
||||
/// <summary>
|
||||
/// The accuracy stat value.
|
||||
/// </summary>
|
||||
public sbyte Accuracy
|
||||
{
|
||||
get => _accuracy;
|
||||
@@ -403,6 +423,7 @@ public record IndividualValueStatisticSet : ClampedStatisticSet<byte>
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IndividualValueStatisticSet"/>
|
||||
public IndividualValueStatisticSet(IndividualValueStatisticSet ivs) : base(ivs)
|
||||
{
|
||||
}
|
||||
@@ -430,6 +451,7 @@ public record EffortValueStatisticSet : ClampedStatisticSet<byte>
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="EffortValueStatisticSet"/>
|
||||
public EffortValueStatisticSet(EffortValueStatisticSet evs) : base(evs)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user