The pokémon object
- class poke_env.battle.pokemon.Pokemon(gen: int, *, species: str | None = None, name: str | None = None, request_pokemon: Dict[str, Any] | None = None, details: str | None = None, teambuilder: TeambuilderPokemon | None = None)
Bases:
object- property ability: str | None
- Returns:
The pokemon’s ability. None if unknown or removed.
- Return type:
str, optional
- property active: bool | None
- Returns:
Boolean indicating whether the pokemon is active.
- Return type:
- property available_z_moves: List[Move]
Caution: this property is not properly tested yet.
- Returns:
The set of moves that pokemon can use as z-moves.
- Return type:
List[Move]
- property base_ability: str | None
- Returns:
The pokemon’s base ability. None if unknown.
- Return type:
str, optional
- property base_types: List[PokemonType]
- Returns:
The pokemon’s non-Tera types, accounting for temporary type changes. Unlike types, this ignores Terastallization.
- Return type:
List[PokemonType]
- cant_move()
- clear_active()
- clear_boosts()
- clear_negative_boosts()
- clear_positive_boosts()
- property current_hp: int
- Returns:
The pokemon’s current hp. For your pokemons, this is the actual value. For opponent’s pokemon, this value depends on showdown information: it can be on a scale from 0 to 100 or on a pixel scale.
- Return type:
- property current_hp_fraction: float
- Returns:
The pokemon’s current remaining hp fraction.
- Return type:
- damage_multiplier(type_or_move: PokemonType | Move) float
Returns the damage multiplier associated with a given type or move on this pokemon.
This method is a shortcut for PokemonType.damage_multiplier with relevant types.
- Parameters:
type_or_move (PokemonType or Move) – The type or move of interest.
- Returns:
The damage multiplier associated with given type on the pokemon.
- Return type:
- end_turn()
- property evs: list[int] | None
- Returns:
The pokemon’s EVs as a list of [HP, Atk, Def, SpA, SpD, Spe]. None if unknown (e.g. opponent’s pokemon).
- Return type:
List[int] | None
- faint()
- property first_turn: bool
- Returns:
Whether this is this pokemon’s first action since its last switch in.
- Return type:
- property forme_change_ability: str | None
- Returns:
The pokemon’s ability after changing forme. None if the pokemon hasn’t changed forme.
- Return type:
str, optional
- property gender: PokemonGender | None
- Returns:
The pokemon’s gender.
- Return type:
PokemonGender, optional
- identifier(player_role: str) str
” :param player_role: The player’s role in the battle (p1 or p2) :type player_role: str :return: The pokemon’s identifier, which can be used to identify it in Showdown logs
- invert_boosts()
- property is_terastallized: bool
- Returns:
Whether the pokemon is currently terastallized
- Return type:
- property ivs: list[int] | None
- Returns:
The pokemon’s IVs as a list of [HP, Atk, Def, SpA, SpD, Spe]. None if unknown (e.g. opponent’s pokemon).
- Return type:
List[int] | None
- property last_move: Move | None
- Returns:
The last move used by this pokemon, or None.
- Return type:
Move | None
- property max_hp: int
- Returns:
The pokemon’s max hp. For your pokemons, this is the actual value. For opponent’s pokemon, this value depends on showdown information: it can be on a scale from 0 to 100 or on a pixel scale.
- Return type:
- property mimic_move: Move | None
- Returns:
The move currently copied by Mimic, if any.
- Return type:
Move | None
- moved(move_id: str, failed: bool = False, use: bool = True, reveal: bool = True, pressure: bool = False)
- property must_recharge: bool
- Returns:
A boolean indicating whether the pokemon must recharge.
- Return type:
- property name: str
- Returns:
The pokemon’s name, which can be used to create Showdown’s identifier.
- Return type:
- property nature: str | None
- Returns:
The pokemon’s nature if known. None if not provided by the teambuilder.
- Return type:
str | None
- property pokeball: str | None
- Returns:
The pokeball in which is the pokemon.
- Return type:
str | None
- property possible_abilities: List[str]
- Returns:
The list of possible abilities for this pokemon.
- Return type:
List[str]
- property preparing: bool
- Returns:
Whether this pokemon is preparing a multi-turn move.
- Return type:
- property preparing_move: Move | None
- Returns:
The move being prepared - optional.
- Return type:
Move, optional
- property preparing_target: bool | Pokemon | None
- Returns:
The moves target - optional.
- Return type:
Any
- primal()
- property protect_counter: int
- Returns:
How many protect-like moves where used in a row by this pokemon.
- Return type:
- property revealed: bool
- Returns:
Whether this pokemon has appeared in the current battle.
- Return type:
- property selected_in_teampreview: bool
- Returns:
Whether this pokemon was selected in teampreview.
- Return type:
- property status_counter: int
- Returns:
The pokemon’s status turn count. Only counts TOXIC and SLEEP statuses.
- Return type:
- property temporary_ability: str | None
- Returns:
The pokemon’s temporary ability, None if none is set.
- Return type:
Optional[str]
- property tera_type: PokemonType | None
- Returns:
The Tera Type of the Pokemon, None if unnown
- Return type:
Optional[PokemonType]
- property type_1: PokemonType
- Returns:
The pokemon’s first type.
- Return type:
- property type_2: PokemonType | None
- Returns:
The pokemon’s second type.
- Return type:
Optional[PokemonType]
- property types: List[PokemonType]
- Returns:
The pokemon’s types. Not a Tuple because moves can add types and also remove types, and override them too.
- Return type:
Tuple[PokemonType]