Surprisingly, more moves
This commit is contained in:
@@ -83,7 +83,8 @@ public record ImmutableStatisticSet<T> where T : struct
|
||||
/// A set of statistics that can be changed.
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public record StatisticSet<T> : ImmutableStatisticSet<T>, IEnumerable<T>, IDeepCloneable where T : struct
|
||||
public record StatisticSet<T> : ImmutableStatisticSet<T>, IEnumerable<(Statistic statistic, T value)>, IDeepCloneable
|
||||
where T : struct
|
||||
{
|
||||
/// <inheritdoc cref="StatisticSet{T}"/>
|
||||
public StatisticSet() : base(default, default, default, default, default, default)
|
||||
@@ -214,14 +215,14 @@ public record StatisticSet<T> : ImmutableStatisticSet<T>, IEnumerable<T>, IDeepC
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual IEnumerator<T> GetEnumerator()
|
||||
public virtual IEnumerator<(Statistic, T)> GetEnumerator()
|
||||
{
|
||||
yield return Hp;
|
||||
yield return Attack;
|
||||
yield return Defense;
|
||||
yield return SpecialAttack;
|
||||
yield return SpecialDefense;
|
||||
yield return Speed;
|
||||
yield return (Statistic.Hp, Hp);
|
||||
yield return (Statistic.Attack, Attack);
|
||||
yield return (Statistic.Defense, Defense);
|
||||
yield return (Statistic.SpecialAttack, SpecialAttack);
|
||||
yield return (Statistic.SpecialDefense, SpecialDefense);
|
||||
yield return (Statistic.Speed, Speed);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -367,16 +368,16 @@ public record StatBoostStatisticSet : ClampedStatisticSet<sbyte>
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override IEnumerator<sbyte> GetEnumerator()
|
||||
public override IEnumerator<(Statistic, sbyte)> GetEnumerator()
|
||||
{
|
||||
yield return Hp;
|
||||
yield return Attack;
|
||||
yield return Defense;
|
||||
yield return SpecialAttack;
|
||||
yield return SpecialDefense;
|
||||
yield return Speed;
|
||||
yield return Evasion;
|
||||
yield return Accuracy;
|
||||
yield return (Statistic.Hp, Hp);
|
||||
yield return (Statistic.Attack, Attack);
|
||||
yield return (Statistic.Defense, Defense);
|
||||
yield return (Statistic.SpecialAttack, SpecialAttack);
|
||||
yield return (Statistic.SpecialDefense, SpecialDefense);
|
||||
yield return (Statistic.Speed, Speed);
|
||||
yield return (Statistic.Evasion, Evasion);
|
||||
yield return (Statistic.Accuracy, Accuracy);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user