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