diff --git a/PkmnLibSharp/Battling/PokemonParty.cs b/PkmnLibSharp/Battling/PokemonParty.cs index 96901e0..b030f6c 100644 --- a/PkmnLibSharp/Battling/PokemonParty.cs +++ b/PkmnLibSharp/Battling/PokemonParty.cs @@ -6,7 +6,7 @@ using PkmnLibSharp.Utilities; namespace PkmnLibSharp.Battling { - public class PokemonParty : PointerWrapper, IEnumerable + public class PokemonParty : PointerWrapper, IReadOnlyList { public delegate void OnSwitchDelegate(ulong a, ulong b); public event OnSwitchDelegate? OnSwitch; @@ -114,8 +114,11 @@ namespace PkmnLibSharp.Battling _cache = null; } + public int Count => (int)Length; - - + public int IndexOf(Pokemon? pokemon) + { + return Party.IndexOf(pokemon); + } } } \ No newline at end of file