PkmnLibRSharp/PkmnLibRSharp/FFI/DynamicData/LearnedMove.cs

59 lines
2.7 KiB
C#

using System;
using System.Runtime.InteropServices;
using PkmnLibSharp.DynamicData;
using PkmnLibSharp.Utils;
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 FFIHandleValue learned_move_new(FFIHandleValue move, MoveLearnMethod learnMethod);
/// <summary>
/// The immutable move information of the move.
/// </summary>
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern FFIHandleValue learned_move_move_data(FFIHandleValue 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(FFIHandleValue 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(FFIHandleValue 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(FFIHandleValue 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(FFIHandleValue 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(FFIHandleValue 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(FFIHandleValue value, byte amount);
}
}