namespace PkmnLib.Plugin.Gen7.Scripts.Abilities; /// /// Justified is an ability that raises the Pokémon's Attack stat when hit by a Dark-type move. /// /// Bulbapedia - Justified /// [Script(ScriptCategory.Ability, "justified")] public class Justified : Script { /// public override void OnIncomingHit(IExecutingMove move, IPokemon target, byte hit) { if (move.GetHitData(target, hit).Type?.Name != "dark") return; EventBatchId batchId = new(); move.Battle.EventHook.Invoke(new AbilityTriggerEvent(target) { BatchId = batchId, }); target.ChangeStatBoost(Statistic.Attack, 1, true, false, batchId); } }