Adds additional functionality for Pokemon

This commit is contained in:
Deukhoofd 2020-08-09 11:49:13 +02:00
parent a9b0ec0e98
commit 12ed340643
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
4 changed files with 14 additions and 3 deletions

View File

@ -92,6 +92,7 @@ namespace PkmnLibSharp.Battling
public byte Level => Creaturelib.Generated.Creature.GetLevel(Ptr); public byte Level => Creaturelib.Generated.Creature.GetLevel(Ptr);
public uint Experience => Creaturelib.Generated.Creature.GetExperience(Ptr); public uint Experience => Creaturelib.Generated.Creature.GetExperience(Ptr);
public uint UniqueIdentifier => Creaturelib.Generated.Creature.GetUniqueIdentifier(Ptr);
public Gender Gender => (Gender) Creaturelib.Generated.Creature.GetGender(Ptr); public Gender Gender => (Gender) Creaturelib.Generated.Creature.GetGender(Ptr);
public byte Coloring => Creaturelib.Generated.Creature.GetColoring(Ptr); public byte Coloring => Creaturelib.Generated.Creature.GetColoring(Ptr);
public bool IsShiny => Pkmnlib.Generated.Pokemon.IsShiny(Ptr) == 1; public bool IsShiny => Pkmnlib.Generated.Pokemon.IsShiny(Ptr) == 1;
@ -343,6 +344,11 @@ namespace PkmnLibSharp.Battling
return Creaturelib.Generated.Creature.HasVolatileScript(Ptr, scriptName.ToPtr()) == 1; return Creaturelib.Generated.Creature.HasVolatileScript(Ptr, scriptName.ToPtr()) == 1;
} }
public bool HasMove(string moveName)
{
return Creaturelib.Generated.Creature.HasAttack(Ptr, moveName.ToPtr()) == 1;
}
public sbyte GetStatBoost(Statistic stat) public sbyte GetStatBoost(Statistic stat)
{ {
return Creaturelib.Generated.Creature.GetStatBoost(Ptr, (Creaturelib.Statistic) stat); return Creaturelib.Generated.Creature.GetStatBoost(Ptr, (Creaturelib.Statistic) stat);

View File

@ -62,6 +62,11 @@ namespace Creaturelib.Generated
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetExperience")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetExperience")]
internal static extern uint GetExperience(IntPtr p); internal static extern uint GetExperience(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>unsigned int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetUniqueIdentifier")]
internal static extern uint GetUniqueIdentifier(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>Gender</returns> /// <returns>Gender</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetGender")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetGender")]

BIN
PkmnLibSharp/Native/libCreatureLib.so (Stored with Git LFS)

Binary file not shown.

File diff suppressed because one or more lines are too long