namespace PkmnLib.Plugin.Gen7.Scripts.Abilities; /// /// Sturdy is an ability that allows the Pokémon to survive a one-hit KO attack with 1 HP. /// /// Bulbapedia - Sturdy /// [Script(ScriptCategory.Ability, "sturdy")] public class Sturdy : Script { /// public override void ChangeIncomingMoveDamage(IExecutingMove move, IPokemon target, byte hit, ref uint damage) { if (damage >= target.MaxHealth && target.CurrentHealth == target.MaxHealth) { damage = target.MaxHealth - 1; } } }