Getting started with implementing an explicit AI, based on the Essentials one.
All checks were successful
Build / Build (push) Successful in 1m2s
All checks were successful
Build / Build (push) Successful in 1m2s
This commit is contained in:
@@ -139,7 +139,8 @@ public record StatisticSet<T> : ImmutableStatisticSet<T>, IEnumerable<(Statistic
|
||||
Speed = value;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException("Invalid statistic.");
|
||||
SetUnknownStat(stat, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,6 +238,9 @@ public record StatisticSet<T> : ImmutableStatisticSet<T>, IEnumerable<(Statistic
|
||||
|
||||
/// <inheritdoc />
|
||||
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
|
||||
|
||||
public bool IsEmpty => Hp.Equals(0) && Attack.Equals(0) && Defense.Equals(0) && SpecialAttack.Equals(0) &&
|
||||
SpecialDefense.Equals(0) && Speed.Equals(0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -320,6 +324,9 @@ public abstract record ClampedStatisticSet<T> : StatisticSet<T> where T : struct
|
||||
/// </summary>
|
||||
public record StatBoostStatisticSet : ClampedStatisticSet<sbyte>
|
||||
{
|
||||
public const sbyte MaxStatBoost = 6;
|
||||
public const sbyte MinStatBoost = -6;
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override sbyte Min => -6;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user