internal static PokemonInfo?From(BattleClient client, PBETeam team, PBEFieldPosition pos) { if (!team.TryGetPokemon(pos, out PBEBattlePokemon? pkmn)) { return(null); } return(new PokemonInfo(pkmn, client.ShouldUseKnownInfo(pkmn.Trainer))); }
internal PokemonInfo(BattleClient client, PBEBattlePokemon pkmn) : this(pkmn, pkmn != null && client.ShouldUseKnownInfo(pkmn.Trainer)) { }