Implements accuracy/evasion
This commit is contained in:
@@ -248,7 +248,7 @@ public abstract record ClampedStatisticSet<T> : StatisticSet<T>
|
||||
{
|
||||
}
|
||||
|
||||
private static T Clamp(T value, T min, T max)
|
||||
protected static T Clamp(T value, T min, T max)
|
||||
{
|
||||
if (value.CompareTo(min) < 0)
|
||||
return min;
|
||||
@@ -307,6 +307,20 @@ public record StatBoostStatisticSet : ClampedStatisticSet<sbyte>
|
||||
/// <inheritdoc />
|
||||
protected override sbyte Max => 6;
|
||||
|
||||
private sbyte _evasion;
|
||||
public sbyte Evasion
|
||||
{
|
||||
get => _evasion;
|
||||
set => _evasion = Clamp(value, Min, Max);
|
||||
}
|
||||
|
||||
private sbyte _accuracy;
|
||||
public sbyte Accuracy
|
||||
{
|
||||
get => _accuracy;
|
||||
set => _accuracy = Clamp(value, Min, Max);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="StatBoostStatisticSet"/>
|
||||
public StatBoostStatisticSet() : base(0, 0, 0, 0, 0, 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user