Other objects
Effect
This module defines the Effect class, which represents in-game effects.
- class poke_env.battle.effect.Effect(value)
Bases:
EnumEnumeration, represent an effect a Pokemon can be affected by.
- AFTERMATH = 3
- AFTER_YOU = 2
- AQUA_RING = 4
- AROMATHERAPY = 5
- AROMA_VEIL = 6
- ATTRACT = 7
- AUTOTOMIZE = 8
- BAD_DREAMS = 9
- BANEFUL_BUNKER = 10
- BATTLE_BOND = 11
- BEAK_BLAST = 12
- BIDE = 13
- BIND = 14
- BURNING_BULWARK = 15
- BURN_UP = 16
- CELEBRATE = 17
- CHARGE = 18
- CLAMP = 19
- COMMANDER = 20
- CONFUSION = 21
- COURT_CHANGE = 22
- CRAFTY_SHIELD = 23
- CUD_CHEW = 24
- CURSE = 25
- CUSTAP_BERRY = 26
- DANCER = 27
- DEFENSE_CURL = 28
- DESTINY_BOND = 29
- DISABLE = 30
- DISGUISE = 31
- DOOM_DESIRE = 32
- DRAGON_CHEER = 33
- DYNAMAX = 34
- EERIE_SPELL = 35
- ELECTRIC_TERRAIN = 36
- ELECTRIFY = 37
- EMBARGO = 38
- EMERGENCY_EXIT = 39
- ENCORE = 40
- ENDURE = 41
- FAIRY_LOCK = 48
- FALLEN = 42
- FALLEN1 = 43
- FALLEN2 = 44
- FALLEN3 = 45
- FALLEN4 = 46
- FALLEN5 = 47
- FEINT = 49
- FICKLE_BEAM = 50
- FIRE_SPIN = 51
- FLASH_FIRE = 52
- FLINCH = 53
- FLOWER_VEIL = 54
- FOCUS_BAND = 55
- FOCUS_ENERGY = 56
- FOCUS_PUNCH = 57
- FOLLOW_ME = 58
- FORESIGHT = 59
- FOREWARN = 60
- FUTURE_SIGHT = 61
- GASTRO_ACID = 62
- GLAIVE_RUSH = 63
- GRAVITY = 64
- GRUDGE = 65
- GUARD_DOG = 66
- GUARD_SPLIT = 67
- GULP_MISSILE = 68
- G_MAX_CENTIFERNO = 69
- G_MAX_CHI_STRIKE = 70
- G_MAX_ONE_BLOW = 71
- G_MAX_RAPID_FLOW = 72
- G_MAX_SANDBLAST = 73
- HADRON_ENGINE = 74
- HEALER = 77
- HEAL_BELL = 75
- HEAL_BLOCK = 76
- HELPING_HAND = 78
- HYDRATION = 79
- HYPERSPACE_FURY = 80
- HYPERSPACE_HOLE = 81
- ICE_FACE = 82
- ILLUSION = 83
- IMMUNITY = 84
- IMPRISON = 85
- INFESTATION = 86
- INGRAIN = 87
- INNARDS_OUT = 88
- INSOMNIA = 89
- INSTRUCT = 90
- IRON_BARBS = 91
- KINGS_SHIELD = 92
- LASER_FOCUS = 93
- LEECH_SEED = 94
- LEPPA_BERRY = 95
- LIGHTNING_ROD = 96
- LIMBER = 97
- LINGERING_AROMA = 98
- LIQUID_OOZE = 99
- LOCKED_MOVE = 100
- LOCK_ON = 101
- MAGIC_COAT = 102
- MAGMA_STORM = 103
- MAGNET_RISE = 104
- MAGNITUDE = 105
- MAT_BLOCK = 106
- MAX_GUARD = 107
- MEGA_SOL = 108
- MIMIC = 109
- MIMICRY = 110
- MIND_READER = 111
- MINIMIZE = 112
- MIRACLE_EYE = 113
- MIST = 114
- MISTY_TERRAIN = 115
- MUMMY = 116
- MUST_RECHARGE = 117
- NIGHTMARE = 118
- NO_RETREAT = 119
- OBLIVIOUS = 120
- OBSTRUCT = 121
- OCTOLOCK = 122
- ORICHALCUM_PULSE = 123
- OWN_TEMPO = 124
- PARTIALLY_TRAPPED = 125
- PASTEL_VEIL = 126
- PERISH0 = 127
- PERISH1 = 128
- PERISH2 = 129
- PERISH3 = 130
- PHANTOM_FORCE = 131
- POLTERGEIST = 132
- POWDER = 133
- POWER_CONSTRUCT = 134
- POWER_SHIFT = 135
- POWER_SPLIT = 136
- POWER_TRICK = 137
- PROTECT = 138
- PROTECTIVE_PADS = 139
- PROTOSYNTHESIS = 140
- PROTOSYNTHESISATK = 141
- PROTOSYNTHESISDEF = 142
- PROTOSYNTHESISSPA = 143
- PROTOSYNTHESISSPD = 144
- PROTOSYNTHESISSPE = 145
- PSYCHIC_TERRAIN = 146
- PURSUIT = 147
- QUARKDRIVEATK = 149
- QUARKDRIVEDEF = 150
- QUARKDRIVESPA = 151
- QUARKDRIVESPD = 152
- QUARKDRIVESPE = 153
- QUARK_DRIVE = 148
- QUASH = 154
- QUICK_CLAW = 155
- QUICK_DRAW = 156
- QUICK_GUARD = 157
- RAGE = 158
- RAGE_POWDER = 159
- REFLECT = 160
- RIPEN = 161
- ROOST = 162
- ROUGH_SKIN = 163
- SAFEGUARD = 164
- SAFETY_GOGGLES = 165
- SALT_CURE = 166
- SAND_TOMB = 167
- SCREEN_CLEANER = 168
- SHADOW_FORCE = 169
- SHED_SKIN = 170
- SILK_TRAP = 171
- SKETCH = 172
- SKILL_SWAP = 173
- SKY_DROP = 174
- SLOW_START = 175
- SMACK_DOWN = 176
- SNAP_TRAP = 177
- SNATCH = 178
- SPARKLING_ARIA = 179
- SPEED_SWAP = 180
- SPIKY_SHIELD = 181
- SPITE = 182
- SPOTLIGHT = 183
- STICKY_HOLD = 184
- STICKY_WEB = 185
- STOCKPILE = 186
- STOCKPILE1 = 187
- STOCKPILE2 = 188
- STOCKPILE3 = 189
- STORM_DRAIN = 190
- STRUGGLE = 191
- SUBSTITUTE = 192
- SUCTION_CUPS = 193
- SUPREME_OVERLORD = 194
- SWEET_VEIL = 196
- SYMBIOSIS = 197
- SYNCHRONIZE = 198
- SYRUP_BOMB = 195
- TANGLING_HAIR = 199
- TAR_SHOT = 200
- TAUNT = 201
- TELEKINESIS = 202
- TELEPATHY = 203
- TERA_SHELL = 204
- TERA_SHIFT = 205
- THERMAL_EXCHANGE = 208
- THROAT_CHOP = 209
- THUNDER_CAGE = 210
- TIDY_UP = 206
- TORMENT = 211
- TOXIC_DEBRIS = 207
- TRAPPED = 212
- TRICK = 213
- TYPEADD = 214
- TYPECHANGE = 215
- UNKNOWN = 1
- UPROAR = 216
- VITAL_SPIRIT = 217
- WANDERING_SPIRIT = 218
- WATER_BUBBLE = 219
- WATER_VEIL = 220
- WHIRLPOOL = 221
- WIDE_GUARD = 222
- WIMP_OUT = 223
- WRAP = 224
- YAWN = 225
- ZERO_TO_HERO = 226
- property ends_on_switch: bool
- Returns:
Whether this effect ends when the pokemon switches out.
- Return type:
- static from_data(message: str) Effect
Returns the Effect object corresponding to the string in static data.
- static from_showdown_message(message: str) Effect
Returns the Effect object corresponding to the message.
- property is_action_countable: bool
- Returns:
Whether it is useful to keep track of the number of times this effect has been activated.
- Return type:
Field
This module defines the Field class, which represents a battle field.
- class poke_env.battle.field.Field(value)
Bases:
EnumEnumeration, represent a non null field in a battle.
- ELECTRIC_TERRAIN = 2
- FAIRY_LOCK = 3
- GRASSY_TERRAIN = 4
- GRAVITY = 5
- HEAL_BLOCK = 6
- MAGIC_ROOM = 7
- MISTY_TERRAIN = 8
- MUD_SPORT = 9
- MUD_SPOT = 10
- NEUTRALIZING_GAS = 11
- PSYCHIC_TERRAIN = 12
- TRICK_ROOM = 13
- UNKNOWN = 1
- WATER_SPORT = 14
- WONDER_ROOM = 15
Move category
This module defines the MoveCategory class, which represents a move category.
Pokemon gender
This module defines the PokemonGender class, which represents the gender of a Pokemon.
- class poke_env.battle.pokemon_gender.PokemonGender(value)
Bases:
EnumEnumeration, represent a pokemon’s gender.
- FEMALE = 1
- MALE = 2
- NEUTRAL = 3
- static from_request_details(gender: str) PokemonGender
- Returns the PokemonGender object corresponding to the gender received in a
message.
- Parameters:
gender (str) – The received gender to convert.
- Returns:
The corresponding PokemonGenre object.
- Return type:
PokemonGenre
Pokemon Type
This module defines the PokemonType class, which represents a Pokemon type. PokemonTypes are mainly associated with Pokemons and moves.
- class poke_env.battle.pokemon_type.PokemonType(value)
Bases:
EnumA Pokemon type
This enumeration represents pokemon types. Each type is an instance of this class, whose name corresponds to the upper case spelling of its english name (ie. FIRE).
- BUG = 1
- DARK = 2
- DRAGON = 3
- ELECTRIC = 4
- FAIRY = 5
- FIGHTING = 6
- FIRE = 7
- FLYING = 8
- GHOST = 9
- GRASS = 10
- GROUND = 11
- ICE = 12
- NORMAL = 13
- POISON = 14
- PSYCHIC = 15
- ROCK = 16
- STEEL = 17
- STELLAR = 20
- THREE_QUESTION_MARKS = 19
- WATER = 18
- damage_multiplier(type_1: PokemonType, type_2: PokemonType | None = None, *, type_chart: Dict[str, Dict[str, float]]) float
Computes the damage multiplier from this type on a pokemon with types type_1 and, optionally, type_2.
- Parameters:
type_1 (PokemonType) – The first type of the target.
type_2 (PokemonType, optional) – The second type of the target. Defaults to None.
- Returns:
The damage multiplier from this type on a pokemon with types type_1 and, optionally, type_2.
- Return type:
- static from_name(name: str) PokemonType
Returns a pokemon type based on its name.
- Parameters:
name (str) – The name of the pokemon type.
- Returns:
The corresponding type object.
- Return type:
Side condition
This module defines the SideCondition class, which represents a in-battle side condition.
- class poke_env.battle.side_condition.SideCondition(value)
Bases:
EnumEnumeration, represent a in-battle side condition.
- AURORA_VEIL = 2
- CRAFTY_SHIELD = 3
- FIRE_PLEDGE = 4
- GRASS_PLEDGE = 10
- G_MAX_CANNONADE = 5
- G_MAX_STEELSURGE = 6
- G_MAX_VINE_LASH = 7
- G_MAX_VOLCALITH = 8
- G_MAX_WILDFIRE = 9
- LIGHT_SCREEN = 11
- LUCKY_CHANT = 12
- MATBLOCK = 13
- MIST = 14
- QUICK_GUARD = 15
- REFLECT = 16
- SAFEGUARD = 17
- SPIKES = 18
- STEALTH_ROCK = 19
- STICKY_WEB = 20
- TAILWIND = 21
- TOXIC_SPIKES = 22
- UNKNOWN = 1
- WATER_PLEDGE = 23
- WIDE_GUARD = 24
- static from_data(message: str)
Returns the SideCondition object corresponding to the string in static data.
- Parameters:
message (str) – The message to convert.
- Returns:
The corresponding SideCondition object.
- Return type:
Status
This module defines the Status class, which represents statuses a pokemon can be afflicted with.
Weather
This module defines the Weather class, which represents a in-battle weather.
Z Crystal
This module contains objects related ot z-crystal management. It should not be used directly.