namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;

/// <summary>
/// Liquid Ooze is an ability that damages attackers using draining moves instead of healing them.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Liquid_Ooze_(Ability)">Bulbapedia - Liquid Ooze</see>
/// </summary>
[Script(ScriptCategory.Ability, "liquid_ooze")]
public class LiquidOoze : Script, IScriptCustomTrigger
{
    /// <inheritdoc />
    public void CustomTrigger(StringKey eventName, ICustomTriggerArgs args)
    {
        if (eventName != CustomTriggers.ModifyDrain || args is not CustomTriggers.ModifyDrainArgs parameters)
            return;
        parameters.Invert = true;
    }
}