35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using System;
|
|
using PkmnLibSharp.Utilities;
|
|
|
|
namespace PkmnLibSharp.Battling
|
|
{
|
|
public class BattleParty : PointerWrapper
|
|
{
|
|
public BattleParty(){}
|
|
|
|
public BattleParty(PokemonParty party, byte[] responsibleIndices)
|
|
{
|
|
var ptr = IntPtr.Zero;
|
|
Creaturelibbattling.Generated.BattleParty.Construct(ref ptr, party.Ptr, responsibleIndices.ArrayPtr(),
|
|
(ulong) responsibleIndices.Length / 2).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);
|
|
}
|
|
}
|
|
} |