Initial commit

This commit is contained in:
2024-07-20 13:51:52 +02:00
commit 3845f91601
26 changed files with 1822 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
using PkmnLib.Static.Utils;
namespace PkmnLib.Static.Moves;
/// <summary>
/// A secondary effect is an effect on a move that happens after it hits.
/// </summary>
public interface ISecondaryEffect
{
/// <summary>
/// The chance in percentages that the effect triggers. When less than 0, the effect is always active.
/// </summary>
public float Chance { get; }
/// <summary>
/// The name of the effect.
/// </summary>
public StringKey Name { get; }
/// <summary>
/// Parameters for the effect.
/// </summary>
public IReadOnlyDictionary<StringKey, object> Parameters { get; }
}
/// <inheritdoc />
public class SecondaryEffectImpl : ISecondaryEffect
{
/// <inheritdoc cref="SecondaryEffectImpl" />
public SecondaryEffectImpl(float chance, StringKey name, IReadOnlyDictionary<StringKey, object> parameters)
{
Chance = chance;
Name = name;
Parameters = parameters;
}
/// <inheritdoc />
public float Chance { get; }
/// <inheritdoc />
public StringKey Name { get; }
/// <inheritdoc />
public IReadOnlyDictionary<StringKey, object> Parameters { get; }
}