25 lines
733 B
C#
25 lines
733 B
C#
using PkmnLibSharp.FFI;
|
|
using PkmnLibSharp.Utils;
|
|
using Interface = PkmnLibSharp.FFI.DynamicData.Libraries.DamageLibrary;
|
|
|
|
namespace PkmnLibSharp.DynamicData.Libraries
|
|
{
|
|
public abstract class DamageLibrary : ExternPointer<object>
|
|
{
|
|
protected DamageLibrary(IdentifiablePointer ptr, bool isOwner) : base(ptr, isOwner)
|
|
{
|
|
}
|
|
|
|
protected override object CreateCache() => new();
|
|
|
|
protected override void Destructor() => Interface.damage_library_drop(Ptr);
|
|
}
|
|
|
|
public class Gen7DamageLibrary : DamageLibrary
|
|
{
|
|
public Gen7DamageLibrary(bool hasRandomness) : base(
|
|
Interface.gen_7_damage_library_new((byte)(hasRandomness ? 1 : 0)), true)
|
|
{
|
|
}
|
|
}
|
|
} |