Lots more work on implementing battling

This commit is contained in:
2024-08-10 09:44:46 +02:00
parent 554e1cf2cd
commit a049dda240
29 changed files with 1226 additions and 48 deletions

View File

@@ -0,0 +1,47 @@
using PkmnLib.Dynamic.Models;
using PkmnLib.Static;
namespace PkmnLib.Dynamic.Events;
/// <summary>
/// Triggered when a Pokemon's stat boost is changed, either positively or negatively.
/// </summary>
public class StatBoostEvent : IEventData
{
/// <inheritdoc cref="StatBoostEvent" />
public StatBoostEvent(IPokemon pokemon, Statistic statistic, sbyte oldBoost, sbyte newBoost)
{
Pokemon = pokemon;
Statistic = statistic;
OldBoost = oldBoost;
NewBoost = newBoost;
}
/// <summary>
/// The Pokemon that had its stat boosted.
/// </summary>
public IPokemon Pokemon { get; }
/// <summary>
/// The statistic that was boosted.
/// </summary>
public Statistic Statistic { get; }
/// <summary>
/// The old boost value.
/// </summary>
public sbyte OldBoost { get; }
/// <summary>
/// The new boost value.
/// </summary>
public sbyte NewBoost { get; }
/// <summary>
/// The difference between the new and old boost values.
/// </summary>
public sbyte BoostDifference => (sbyte)(NewBoost - OldBoost);
/// <inheritdoc />
public EventBatchId BatchId { get; init; }
}