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