namespace PkmnLib.Plugin.Gen7.Scripts.Abilities; /// /// Contrary is an ability that inverts all stat changes for the Pokémon. /// When a stat would normally be raised, it is lowered instead, and vice versa. /// This applies to both self-inflicted stat changes and those caused by other Pokémon. /// /// Bulbapedia - Contrary /// [Script(ScriptCategory.Ability, "contrary")] public class Contrary : Script { /// public override void ChangeStatBoostChange(IPokemon target, Statistic stat, bool selfInflicted, ref sbyte amount) { // Invert the stat change amount = (sbyte)-amount; target.BattleData?.Battle.EventHook.Invoke(new AbilityTriggerEvent(target)); } }