using PkmnLib.Plugin.Gen7.Scripts.Battle;

namespace PkmnLib.Plugin.Gen7.Scripts.Moves;

[Script(ScriptCategory.Move, "future_sight")]
public class FutureSight : Script, IScriptStopBeforeMove
{
    /// <inheritdoc />
    public void StopBeforeMove(IExecutingMove move, ref bool prevent)
    {
        var battleData = move.User.BattleData;
        if (battleData == null)
            return;
        battleData.Battle.Volatile.Add(new FutureSightEffect(move.MoveChoice));

        prevent = true;
    }
}