More move effects

This commit is contained in:
2025-03-02 14:03:51 +01:00
parent 9b0ac36597
commit c0bc905c46
40 changed files with 804 additions and 46 deletions

View File

@@ -27,7 +27,7 @@ public interface IReadOnlyTypeLibrary
/// Gets the effectiveness for a single attacking type against an amount of defending types.
/// This is equivalent to running get_single_effectiveness on each defending type, and multiplying the results with each other.
/// </summary>
float GetEffectiveness(TypeIdentifier attacking, IReadOnlyList<TypeIdentifier> defending);
float GetEffectiveness(TypeIdentifier attacking, IEnumerable<TypeIdentifier> defending);
IEnumerable<(TypeIdentifier type, float effectiveness)> GetAllEffectivenessFromAttacking(TypeIdentifier attacking);
}
@@ -68,7 +68,7 @@ public class TypeLibrary : IReadOnlyTypeLibrary
}
/// <inheritdoc />
public float GetEffectiveness(TypeIdentifier attacking, IReadOnlyList<TypeIdentifier> defending) =>
public float GetEffectiveness(TypeIdentifier attacking, IEnumerable<TypeIdentifier> defending) =>
defending.Aggregate<TypeIdentifier, float>(1,
(current, type) => current * GetSingleEffectiveness(attacking, type));