// AUTOMATICALLY GENERATED, DO NOT EDIT
using System;
using System.Runtime.InteropServices;

namespace Creaturelib.Generated
{
    internal static class MiscLibrary
    {
        /// <returns>MiscLibrary *</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_Construct")]
        internal static extern IntPtr Construct();

        /// <param name="p">const MiscLibrary *</param>
        /// <returns>void</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_Destruct")]
        internal static extern void Destruct(IntPtr p);

        /// <param name="out">bool &</param>
        /// <param name="p">MiscLibrary *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="hit">unsigned char</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_IsCritical")]
        internal static extern byte IsCritical(ref byte @out, IntPtr p, IntPtr attack, IntPtr target, byte hit);

        /// <param name="out">bool &</param>
        /// <param name="p">MiscLibrary *</param>
        /// <param name="switchChoice">FleeTurnChoice *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_CanFlee")]
        internal static extern byte CanFlee(ref byte @out, IntPtr p, IntPtr switchChoice);

        /// <param name="out">BaseTurnChoice * &</param>
        /// <param name="p">MiscLibrary *</param>
        /// <param name="user">Creature *</param>
        /// <param name="sideTarget">unsigned char</param>
        /// <param name="creatureTarget">unsigned char</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_ReplacementAttack")]
        internal static extern byte ReplacementAttack(ref IntPtr @out, IntPtr p, IntPtr user, byte sideTarget, byte creatureTarget);

    }
}
