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

namespace Creaturelib.Generated
{
    internal static class Script
    {
        /// <param name="p">Script *</param>
        /// <returns>void</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_Destruct")]
        internal static extern void Destruct(IntPtr p);

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

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

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

        /// <param name="p">Script *</param>
        /// <param name="choice">const BaseTurnChoice *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnBeforeTurn")]
        internal static extern byte OnBeforeTurn(IntPtr p, IntPtr choice);

        /// <param name="p">Script *</param>
        /// <param name="choice">AttackTurnChoice *</param>
        /// <param name="outAttack">const char * &</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ChangeAttack")]
        internal static extern byte ChangeAttack(IntPtr p, IntPtr choice, ref IntPtr outAttack);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="outResult">bool *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_PreventAttack")]
        internal static extern byte PreventAttack(IntPtr p, IntPtr attack, IntPtr outResult);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="outResult">bool *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_FailAttack")]
        internal static extern byte FailAttack(IntPtr p, IntPtr attack, IntPtr outResult);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="outResult">bool *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_StopBeforeAttack")]
        internal static extern byte StopBeforeAttack(IntPtr p, IntPtr attack, IntPtr outResult);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnBeforeAttack")]
        internal static extern byte OnBeforeAttack(IntPtr p, IntPtr attack);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="outResult">bool *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_FailIncomingAttack")]
        internal static extern byte FailIncomingAttack(IntPtr p, IntPtr attack, IntPtr target, IntPtr outResult);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="outResult">bool *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_IsInvulnerable")]
        internal static extern byte IsInvulnerable(IntPtr p, IntPtr attack, IntPtr target, IntPtr outResult);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnAttackMiss")]
        internal static extern byte OnAttackMiss(IntPtr p, IntPtr attack, IntPtr target);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="hitNumber">unsigned char</param>
        /// <param name="outType">unsigned char *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ChangeAttackType")]
        internal static extern byte ChangeAttackType(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr outType);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="hitNumber">unsigned char</param>
        /// <param name="basePower">unsigned char *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OverrideBasePower")]
        internal static extern byte OverrideBasePower(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr basePower);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="hitNumber">unsigned char</param>
        /// <param name="statsUser">Creature * *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ChangeDamageStatsUser")]
        internal static extern byte ChangeDamageStatsUser(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr statsUser);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="hitNumber">unsigned char</param>
        /// <param name="bypass">bool *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_BypassDefensiveStat")]
        internal static extern byte BypassDefensiveStat(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr bypass);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="hitNumber">unsigned char</param>
        /// <param name="bypass">bool *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_BypassOffensiveStat")]
        internal static extern byte BypassOffensiveStat(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr bypass);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="hitNumber">unsigned char</param>
        /// <param name="modifier">float *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ModifyStatModifier")]
        internal static extern byte ModifyStatModifier(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr modifier);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="hitNumber">unsigned char</param>
        /// <param name="modifier">float *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ModifyDamageModifier")]
        internal static extern byte ModifyDamageModifier(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr modifier);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="hitNumber">unsigned char</param>
        /// <param name="damage">unsigned int *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OverrideDamage")]
        internal static extern byte OverrideDamage(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr damage);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="hitNumber">unsigned char</param>
        /// <param name="outResult">bool *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_PreventSecondaryEffects")]
        internal static extern byte PreventSecondaryEffects(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr outResult);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="hitNumber">unsigned char</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnSecondaryEffect")]
        internal static extern byte OnSecondaryEffect(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber);

        /// <param name="p">Script *</param>
        /// <param name="attack">ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnAfterHits")]
        internal static extern byte OnAfterHits(IntPtr p, IntPtr attack, IntPtr target);

        /// <param name="p">Script *</param>
        /// <param name="choice">const SwitchTurnChoice *</param>
        /// <param name="outResult">bool *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_PreventSelfSwitch")]
        internal static extern byte PreventSelfSwitch(IntPtr p, IntPtr choice, IntPtr outResult);

        /// <param name="p">Script *</param>
        /// <param name="attack">const ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="chance">float *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ModifyEffectChance")]
        internal static extern byte ModifyEffectChance(IntPtr p, IntPtr attack, IntPtr target, IntPtr chance);

        /// <param name="p">Script *</param>
        /// <param name="attack">const ExecutingAttack *</param>
        /// <param name="target">Creature *</param>
        /// <param name="chance">float *</param>
        /// <returns>unsigned char</returns>
        [DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ModifyIncomingEffectChance")]
        internal static extern byte ModifyIncomingEffectChance(IntPtr p, IntPtr attack, IntPtr target, IntPtr chance);

    }
}
