namespace PkmnLib.Plugin.Gen7.Scripts.Abilities; /// /// Limber is an ability that prevents the Pokémon from being paralyzed. /// /// Bulbapedia - Limber /// [Script(ScriptCategory.Ability, "limber")] public class Limber : Script, IScriptPreventStatusChange { /// public void PreventStatusChange(IPokemon pokemon, StringKey status, bool selfInflicted, ref bool preventStatus) { if (status != ScriptUtils.ResolveName()) return; // If the status is being inflicted by a move, we can also prevent the move from inflicting it if (selfInflicted) return; pokemon.BattleData?.Battle.EventHook.Invoke(new AbilityTriggerEvent(pokemon)); preventStatus = true; } }