namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;

/// <summary>
/// Own Tempo is an ability that prevents the Pokémon from becoming confused.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Own_Tempo_(Ability)">Bulbapedia - Own Tempo</see>
/// </summary>
[Script(ScriptCategory.Ability, "own_tempo")]
public class OwnTempo : Script, IScriptPreventVolatileAdd
{
    /// <inheritdoc />
    public void PreventVolatileAdd(IScriptSource parent, Script script, ref bool preventVolatileAdd)
    {
        if (script is Pokemon.Confusion)
            preventVolatileAdd = true;
    }
}