Implements a bunch more moves
This commit is contained in:
@@ -13,6 +13,11 @@ public interface IReadOnlyTypeLibrary
|
||||
/// </summary>
|
||||
bool TryGetTypeIdentifier(StringKey key, out TypeIdentifier typeIdentifier);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type identifier for a type with an index.
|
||||
/// </summary>
|
||||
bool TryGetTypeIdentifierFromIndex(byte index, [MaybeNullWhen(false)] out TypeIdentifier typeIdentifier);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the effectiveness for a single attacking type against a single defending type.
|
||||
/// </summary>
|
||||
@@ -46,6 +51,18 @@ public class TypeLibrary : IReadOnlyTypeLibrary
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool TryGetTypeIdentifierFromIndex(byte index, out TypeIdentifier typeIdentifier)
|
||||
{
|
||||
if (index < 1 || index > _types.Count)
|
||||
{
|
||||
typeIdentifier = default;
|
||||
return false;
|
||||
}
|
||||
typeIdentifier = _types[index - 1];
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public float GetSingleEffectiveness(TypeIdentifier attacking, TypeIdentifier defending)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user