Initial commit
This commit is contained in:
45
PkmnLib.Static/Moves/SecondaryEffect.cs
Normal file
45
PkmnLib.Static/Moves/SecondaryEffect.cs
Normal 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; }
|
||||
}
|
||||
Reference in New Issue
Block a user