More moves implemented
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Immutable;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
namespace PkmnLib.Static.Species;
|
||||
@@ -17,17 +18,20 @@ public interface IAbility : INamedValue
|
||||
/// The parameters for the script effect of the ability.
|
||||
/// </summary>
|
||||
IReadOnlyDictionary<StringKey, object?> Parameters { get; }
|
||||
|
||||
bool HasFlag(StringKey key);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public class AbilityImpl : IAbility
|
||||
{
|
||||
/// <inheritdoc cref="AbilityImpl" />
|
||||
public AbilityImpl(StringKey name, StringKey? effect, IReadOnlyDictionary<StringKey, object?> parameters)
|
||||
public AbilityImpl(StringKey name, StringKey? effect, IReadOnlyDictionary<StringKey, object?> parameters, ImmutableHashSet<StringKey> flags)
|
||||
{
|
||||
Name = name;
|
||||
Effect = effect;
|
||||
Parameters = parameters;
|
||||
Flags = flags;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -38,6 +42,14 @@ public class AbilityImpl : IAbility
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyDictionary<StringKey, object?> Parameters { get; }
|
||||
|
||||
public ImmutableHashSet<StringKey> Flags;
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool HasFlag(StringKey key)
|
||||
{
|
||||
return Flags.Contains(key);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user