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

namespace Creaturelib.Generated
{
    internal static class Creature
    {
        /// <param name="out">Creature * &</param>
        /// <param name="library">const BattleLibrary *</param>
        /// <param name="species">const CreatureSpecies *</param>
        /// <param name="variant">const SpeciesVariant *</param>
        /// <param name="level">unsigned char</param>
        /// <param name="experience">unsigned int</param>
        /// <param name="uid">unsigned int</param>
        /// <param name="gender">Gender</param>
        /// <param name="coloring">unsigned char</param>
        /// <param name="heldItem">const Item *</param>
        /// <param name="nickname">const char *</param>
        /// <param name="secretTalent">bool</param>
        /// <param name="talent">unsigned char</param>
        /// <param name="attacks">LearnedAttack * *</param>
        /// <param name="attacksNum">long unsigned int</param>
        /// <param name="allowedExperienceGain">bool</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Construct")]
        internal static extern byte Construct(ref IntPtr @out, IntPtr library, IntPtr species, IntPtr variant, byte level, uint experience, uint uid, Gender gender, byte coloring, IntPtr heldItem, IntPtr nickname, byte secretTalent, byte talent, IntPtr attacks, ulong attacksNum, byte allowedExperienceGain);

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

        /// <param name="p">Creature *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Initialize")]
        internal static extern byte Initialize(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>const BattleLibrary *</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetLibrary")]
        internal static extern IntPtr GetLibrary(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>const CreatureSpecies *</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetSpecies")]
        internal static extern IntPtr GetSpecies(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>const SpeciesVariant *</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetVariant")]
        internal static extern IntPtr GetVariant(IntPtr p);

        /// <param name="p">Creature *</param>
        /// <param name="species">const CreatureSpecies *</param>
        /// <param name="variant">const SpeciesVariant *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeSpecies")]
        internal static extern byte ChangeSpecies(IntPtr p, IntPtr species, IntPtr variant);

        /// <param name="p">Creature *</param>
        /// <param name="variant">const SpeciesVariant *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeVariant")]
        internal static extern byte ChangeVariant(IntPtr p, IntPtr variant);

        /// <param name="p">const Creature *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetLevel")]
        internal static extern byte GetLevel(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>unsigned int</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetExperience")]
        internal static extern uint GetExperience(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>unsigned int</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetUniqueIdentifier")]
        internal static extern uint GetUniqueIdentifier(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>Gender</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetGender")]
        internal static extern Gender GetGender(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetColoring")]
        internal static extern byte GetColoring(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <param name="name">const char *</param>
        /// <returns>bool</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasHeldItem")]
        internal static extern byte HasHeldItem(IntPtr p, IntPtr name);

        /// <param name="p">const Creature *</param>
        /// <param name="hash">unsigned int</param>
        /// <returns>bool</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasHeldItemWithHash")]
        internal static extern byte HasHeldItemWithHash(IntPtr p, uint hash);

        /// <param name="p">const Creature *</param>
        /// <returns>const Item *</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetHeldItem")]
        internal static extern IntPtr GetHeldItem(IntPtr p);

        /// <param name="p">Creature *</param>
        /// <param name="name">const char *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItem")]
        internal static extern byte SetHeldItem(IntPtr p, IntPtr name);

        /// <param name="p">Creature *</param>
        /// <param name="hash">unsigned int</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItemWithHash")]
        internal static extern byte SetHeldItemWithHash(IntPtr p, uint hash);

        /// <param name="p">Creature *</param>
        /// <param name="item">const Item *</param>
        /// <returns>void</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItemFromItem")]
        internal static extern void SetHeldItemFromItem(IntPtr p, IntPtr item);

        /// <param name="p">const Creature *</param>
        /// <returns>unsigned int</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetCurrentHealth")]
        internal static extern uint GetCurrentHealth(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>Battle *</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBattle")]
        internal static extern IntPtr GetBattle(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>BattleSide *</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBattleSide")]
        internal static extern IntPtr GetBattleSide(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>bool</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_IsOnBattleField")]
        internal static extern byte IsOnBattleField(IntPtr p);

        /// <param name="p">Creature *</param>
        /// <returns>const char *</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetNickname")]
        internal static extern IntPtr GetNickname(IntPtr p);

        /// <param name="p">Creature *</param>
        /// <param name="type">unsigned char</param>
        /// <returns>bool</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasType")]
        internal static extern byte HasType(IntPtr p, byte type);

        /// <param name="p">const Creature *</param>
        /// <returns>unsigned int</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetMaxHealth")]
        internal static extern uint GetMaxHealth(IntPtr p);

        /// <param name="p">Creature *</param>
        /// <param name="level">signed char</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeLevelBy")]
        internal static extern byte ChangeLevelBy(IntPtr p, sbyte level);

        /// <param name="p">Creature *</param>
        /// <param name="damage">unsigned int</param>
        /// <param name="source">DamageSource</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Damage")]
        internal static extern byte Damage(IntPtr p, uint damage, DamageSource source);

        /// <param name="p">Creature *</param>
        /// <param name="health">unsigned int</param>
        /// <param name="canRevive">bool</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Heal")]
        internal static extern byte Heal(IntPtr p, uint health, byte canRevive);

        /// <param name="p">Creature *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_RestoreAllAttackUses")]
        internal static extern byte RestoreAllAttackUses(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>bool</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetRealTalentIsSecret")]
        internal static extern byte GetRealTalentIsSecret(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>bool</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetRealTalentIndex")]
        internal static extern byte GetRealTalentIndex(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <param name="out">const char * &</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetActiveTalent")]
        internal static extern byte GetActiveTalent(IntPtr p, ref IntPtr @out);

        /// <param name="p">Creature *</param>
        /// <param name="talent">const char *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_OverrideActiveTalent")]
        internal static extern byte OverrideActiveTalent(IntPtr p, IntPtr talent);

        /// <param name="p">Creature *</param>
        /// <param name="experience">unsigned int</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_AddExperience")]
        internal static extern byte AddExperience(IntPtr p, uint experience);

        /// <param name="p">Creature *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ClearVolatileScripts")]
        internal static extern byte ClearVolatileScripts(IntPtr p);

        /// <param name="p">Creature *</param>
        /// <param name="scriptName">const char *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_AddVolatileScriptByName")]
        internal static extern byte AddVolatileScriptByName(IntPtr p, IntPtr scriptName);

        /// <param name="p">Creature *</param>
        /// <param name="script">Script *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_AddVolatileScript")]
        internal static extern byte AddVolatileScript(IntPtr p, IntPtr script);

        /// <param name="p">Creature *</param>
        /// <param name="scriptName">const char *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_RemoveVolatileScriptByName")]
        internal static extern byte RemoveVolatileScriptByName(IntPtr p, IntPtr scriptName);

        /// <param name="p">Creature *</param>
        /// <param name="script">Script *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_RemoveVolatileScript")]
        internal static extern byte RemoveVolatileScript(IntPtr p, IntPtr script);

        /// <param name="p">Creature *</param>
        /// <param name="scriptName">const char *</param>
        /// <returns>bool</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasVolatileScript")]
        internal static extern byte HasVolatileScript(IntPtr p, IntPtr scriptName);

        /// <param name="p">Creature *</param>
        /// <returns>long unsigned int</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetAttacksCount")]
        internal static extern ulong GetAttacksCount(IntPtr p);

        /// <param name="p">Creature *</param>
        /// <returns>const LearnedAttack * *</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetAttacks")]
        internal static extern IntPtr GetAttacks(IntPtr p);

        /// <param name="p">Creature *</param>
        /// <param name="scriptName">const char *</param>
        /// <returns>bool</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasAttack")]
        internal static extern byte HasAttack(IntPtr p, IntPtr scriptName);

        /// <param name="p">const Creature *</param>
        /// <returns>const CreatureSpecies *</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetDisplaySpecies")]
        internal static extern IntPtr GetDisplaySpecies(IntPtr p);

        /// <param name="p">const Creature *</param>
        /// <returns>const SpeciesVariant *</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetDisplayVariant")]
        internal static extern IntPtr GetDisplayVariant(IntPtr p);

        /// <param name="p">Creature *</param>
        /// <param name="species">const CreatureSpecies *</param>
        /// <returns>void</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetDisplaySpecies")]
        internal static extern void SetDisplaySpecies(IntPtr p, IntPtr species);

        /// <param name="p">Creature *</param>
        /// <param name="variant">const SpeciesVariant *</param>
        /// <returns>void</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetDisplayVariant")]
        internal static extern void SetDisplayVariant(IntPtr p, IntPtr variant);

        /// <param name="p">Creature *</param>
        /// <param name="stat">Statistic</param>
        /// <param name="diffAmount">signed char</param>
        /// <returns>void</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeStatBoost")]
        internal static extern void ChangeStatBoost(IntPtr p, Statistic stat, sbyte diffAmount);

        /// <param name="p">Creature *</param>
        /// <param name="stat">Statistic</param>
        /// <returns>unsigned int</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetFlatStat")]
        internal static extern uint GetFlatStat(IntPtr p, Statistic stat);

        /// <param name="p">Creature *</param>
        /// <param name="stat">Statistic</param>
        /// <returns>unsigned int</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBoostedStat")]
        internal static extern uint GetBoostedStat(IntPtr p, Statistic stat);

        /// <param name="p">Creature *</param>
        /// <param name="stat">Statistic</param>
        /// <returns>unsigned int</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBaseStat")]
        internal static extern uint GetBaseStat(IntPtr p, Statistic stat);

        /// <param name="p">Creature *</param>
        /// <param name="stat">Statistic</param>
        /// <returns>signed char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetStatBoost")]
        internal static extern sbyte GetStatBoost(IntPtr p, Statistic stat);

        /// <param name="p">const Creature *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetAvailableAttackSlot")]
        internal static extern byte GetAvailableAttackSlot(IntPtr p);

        /// <param name="p">Creature *</param>
        /// <param name="attack">LearnedAttack *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_AddAttack")]
        internal static extern byte AddAttack(IntPtr p, IntPtr attack);

        /// <param name="p">Creature *</param>
        /// <param name="index">long unsigned int</param>
        /// <param name="attack">LearnedAttack *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ReplaceAttack")]
        internal static extern byte ReplaceAttack(IntPtr p, ulong index, IntPtr attack);

        /// <param name="p">Creature *</param>
        /// <param name="a">long unsigned int</param>
        /// <param name="b">long unsigned int</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SwapAttack")]
        internal static extern byte SwapAttack(IntPtr p, ulong a, ulong b);

    }
}
