Lots more work on implementing battling
This commit is contained in:
@@ -75,6 +75,7 @@ public record ImmutableStatisticSet<T>
|
||||
public record StatisticSet<T> : ImmutableStatisticSet<T>
|
||||
where T : struct
|
||||
{
|
||||
/// <inheritdoc cref="StatisticSet{T}"/>
|
||||
public StatisticSet() : base(default, default, default, default, default, default)
|
||||
{
|
||||
}
|
||||
@@ -270,6 +271,7 @@ public record StatBoostStatisticSet : ClampedStatisticSet<sbyte>
|
||||
/// <inheritdoc />
|
||||
protected override sbyte Max => 6;
|
||||
|
||||
/// <inheritdoc cref="StatBoostStatisticSet"/>
|
||||
public StatBoostStatisticSet() : base(0, 0, 0, 0, 0, 0)
|
||||
{
|
||||
}
|
||||
@@ -292,6 +294,7 @@ public record IndividualValueStatisticSet : ClampedStatisticSet<byte>
|
||||
/// <inheritdoc />
|
||||
protected override byte Max => 31;
|
||||
|
||||
/// <inheritdoc cref="IndividualValueStatisticSet"/>
|
||||
public IndividualValueStatisticSet() : base(0, 0, 0, 0, 0, 0)
|
||||
{
|
||||
}
|
||||
@@ -314,6 +317,7 @@ public record EffortValueStatisticSet : ClampedStatisticSet<byte>
|
||||
/// <inheritdoc />
|
||||
protected override byte Max => 252;
|
||||
|
||||
/// <inheritdoc cref="EffortValueStatisticSet"/>
|
||||
public EffortValueStatisticSet() : base(0, 0, 0, 0, 0, 0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
namespace PkmnLib.Static.Utils;
|
||||
|
||||
/// <summary>
|
||||
/// Extension methods for <see cref="IEnumerable{T}"/>.
|
||||
/// </summary>
|
||||
public static class EnumerableHelpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns all elements of the enumerable that are not null.
|
||||
/// </summary>
|
||||
public static IEnumerable<T> WhereNotNull<T>(this IEnumerable<T?> enumerable) where T : class =>
|
||||
enumerable.Where(x => x is not null)!;
|
||||
}
|
||||
Reference in New Issue
Block a user