41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using PkmnLibSharp.Utils;
|
|
using Interface = PkmnLibSharp.FFI.StaticData.LearnableMoves;
|
|
|
|
namespace PkmnLibSharp.StaticData
|
|
{
|
|
/// <summary>
|
|
/// The storage of the moves a Pokemon can learn.
|
|
/// </summary>
|
|
public class LearnableMoves : HandleType
|
|
{
|
|
/// <inheritdoc cref="LearnableMoves"/>
|
|
protected LearnableMoves(FFIHandle handle) : base(handle)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Instantiates a new object to store the moves a Pokemon can learn.
|
|
/// </summary>
|
|
public static LearnableMoves Create()
|
|
{
|
|
var handle = Interface.learnable_moves_new();
|
|
return Resolver.Instance.ResolveLearnableMoves(handle.Resolve());
|
|
}
|
|
|
|
/// <summary>
|
|
/// Adds a new level move the Pokemon can learn.
|
|
/// </summary>
|
|
public void AddLevelMove(LevelInt level, string moveName)
|
|
{
|
|
Interface.learnable_moves_add_level_move(Handle, level, moveName.ToPtr());
|
|
}
|
|
|
|
/// <summary>
|
|
/// Adds a new level move the Pokemon can learn.
|
|
/// </summary>
|
|
public void AddLevelMove(LevelInt level, MoveData move)
|
|
{
|
|
Interface.learnable_moves_add_level_move(Handle, level, move.Name.ToPtr());
|
|
}
|
|
}
|
|
} |