namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;

[Script(ScriptCategory.Pokemon, "telekinesis")]
public class TelekinesisEffect : Script, IScriptChangeIncomingEffectiveness, IScriptIsFloating,
    IScriptChangeIncomingAccuracy
{
    /// <inheritdoc />
    public void ChangeIncomingAccuracy(IExecutingMove executingMove, IPokemon target, byte hitIndex,
        ref int modifiedAccuracy)
    {
        modifiedAccuracy = 255;
    }

    /// <inheritdoc />
    public void IsFloating(IPokemon pokemon, ref bool isFloating)
    {
        isFloating = true;
    }

    /// <inheritdoc />
    public void ChangeIncomingEffectiveness(IExecutingMove executingMove, IPokemon target, byte hitIndex,
        ref float effectiveness)
    {
        if (executingMove.UseMove.MoveType.Name == "ground")
            effectiveness = 0;
    }
}