PkmnLibRSharp/PkmnLibRSharp/FFI/DynamicData/LearnedMove.cs

64 lines
2.9 KiB
C#

using System;
using System.Runtime.InteropServices;
using PkmnLibSharp.DynamicData;
namespace PkmnLibSharp.FFI.DynamicData
{
internal static class LearnedMove
{
/// <summary>
/// Instantiate a new learned move.
/// </summary>
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern IdentifiablePointer learned_move_new(IntPtr move, MoveLearnMethod learnMethod);
/// <summary>
/// Drops a learned move.
/// </summary>
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern void learned_move_drop(IntPtr value);
/// <summary>
/// The immutable move information of the move.
/// </summary>
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern IdentifiablePointer learned_move_move_data(IntPtr value);
/// <summary>
/// The maximal power points for this move.
/// </summary>
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern byte learned_move_max_pp(IntPtr value);
/// <summary>
/// The amount of remaining power points. If this is 0, we can not use the move anymore.
/// </summary>
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern byte learned_move_remaining_pp(IntPtr value);
/// <summary>
/// The way the move was learned.
/// </summary>
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern MoveLearnMethod learned_move_learn_method(IntPtr value);
/// <summary>
/// Try and reduce the PP by a certain amount. If the amount is higher than the current uses,
/// return 0. Otherwise, reduce the PP, and return 1.
/// </summary>
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern byte learned_move_try_use(IntPtr value, byte amount);
/// <summary>
/// Set the remaining PP to the max amount of PP.
/// </summary>
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern void learned_move_restore_all_uses(IntPtr value);
/// <summary>
/// Restore the remaining PP by a certain amount. Will prevent it from going above max PP.
/// </summary>
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern void learned_move_restore_uses(IntPtr value, byte amount);
}
}