namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
///
/// Speed Boost is an ability that raises the Pokémon's Speed at the end of each turn.
///
/// Bulbapedia - Speed Boost
///
[Script(ScriptCategory.Ability, "speed_boost")]
public class SpeedBoost : Script
{
///
public override void OnEndTurn(IScriptSource owner, IBattle battle)
{
if (owner is not IPokemon pokemon)
return;
EventBatchId batchId = new();
battle.EventHook.Invoke(new AbilityTriggerEvent(pokemon)
{
BatchId = batchId,
});
pokemon.ChangeStatBoost(Statistic.Speed, 1, true, false, batchId);
}
}