using PkmnLib.Static.Moves;

namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;

/// <summary>
/// Prankster is an ability that gives priority to status moves.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Prankster_(Ability)">Bulbapedia - Prankster</see>
/// </summary>
[Script(ScriptCategory.Ability, "prankster")]
public class Prankster : Script, IScriptChangePriority
{
    /// <inheritdoc />
    public void ChangePriority(IMoveChoice choice, ref sbyte priority)
    {
        if (choice.ChosenMove.MoveData.Category == MoveCategory.Status && priority != sbyte.MaxValue)
            priority++;
    }
}