using PkmnLib.Plugin.Gen7.Scripts.Battle;

namespace PkmnLib.Plugin.Gen7.Scripts.Moves;

[Script(ScriptCategory.Move, "fairy_lock")]
public class FairyLock : Script, IScriptOnSecondaryEffect
{
    /// <inheritdoc />
    public void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
    {
        var battle = target.BattleData?.Battle;
        battle?.Volatile.Add(new FairyLockEffect());
    }
}