Support for BattleParty.
This commit is contained in:
parent
d01e6a8df7
commit
e2ecec8e7a
|
@ -0,0 +1,33 @@
|
||||||
|
using System;
|
||||||
|
using PkmnLibSharp.Utilities;
|
||||||
|
|
||||||
|
namespace PkmnLibSharp.Battling
|
||||||
|
{
|
||||||
|
public class BattleParty : PointerWrapper
|
||||||
|
{
|
||||||
|
public BattleParty(PokemonParty party, byte[] responsibleIndices)
|
||||||
|
{
|
||||||
|
var ptr = IntPtr.Zero;
|
||||||
|
Creaturelibbattling.Generated.BattleParty.Construct(ref ptr, party.Ptr, responsibleIndices.ArrayPtr(),
|
||||||
|
(ulong) responsibleIndices.Length).Assert();
|
||||||
|
Initialize(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsResponsibleForIndex(byte side, byte index)
|
||||||
|
{
|
||||||
|
byte result = 0;
|
||||||
|
Creaturelibbattling.Generated.BattleParty.IsResponsibleForIndex(ref result, Ptr, side, index).Assert();
|
||||||
|
return result == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool HasPokemonNotInField()
|
||||||
|
{
|
||||||
|
return Creaturelibbattling.Generated.BattleParty.HasCreaturesNotInField(Ptr) == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void DeletePtr()
|
||||||
|
{
|
||||||
|
Creaturelibbattling.Generated.BattleParty.Destruct(Ptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue