namespace PkmnLib.Plugin.Gen7.Scripts.Abilities; /// /// Aura Break is an ability that reverses the effects of Dark Aura and Fairy Aura. /// When this ability is present, Dark-type and Fairy-type moves are reduced in power by 25% instead of being boosted. /// /// Bulbapedia - Aura Break /// [Script(ScriptCategory.Ability, "aura_break")] public class AuraBreak : Script, IScriptCustomTrigger { /// public void CustomTrigger(StringKey eventName, ICustomTriggerArgs args) { if (eventName != CustomTriggers.ModifyAuraEffect || args is not CustomTriggers.ModifyAuraEffectArgs auraArgs) return; var typeName = auraArgs.Move.UseMove.MoveType.Name; if (typeName == "dark" || typeName == "fairy") { // Reverse the aura effect by reducing power by 25% auraArgs.AuraEffect *= 0.75f; } } }