namespace PkmnLib.Plugin.Gen7.Scripts.Abilities; /// /// Sap Sipper is an ability that grants immunity to Grass-type moves and raises Attack when hit by one. /// /// Bulbapedia - Sap Sipper /// [Script(ScriptCategory.Ability, "sap_sipper")] public class SapSipper : Script { /// public override void IsInvulnerableToMove(IExecutingMove move, IPokemon target, ref bool invulnerable) { if (move.GetHitData(target, 0).Type?.Name == "grass") { invulnerable = true; move.Battle.EventHook.Invoke(new AbilityTriggerEvent(target)); target.ChangeStatBoost(Statistic.Attack, 1, true, false); } } }