Battle rooms use a specialized protocol for communicating game state, moves, switches, and other battle events. This page documents the battle-specific message types.
Battle Initialization
The beginning of a battle includes player information, team preview, and game rules.
Example Battle Start
|player|p1|Anonycat|60|1200
|player|p2|Anonybird|113|1300
|teamsize|p1|4
|teamsize|p2|5
|gametype|doubles
|gen|7
|tier|[Gen 7] Doubles Ubers
|rule|Species Clause: Limit one of each Pokémon
|rule|OHKO Clause: OHKO moves are banned
|rule|Moody Clause: Moody is banned
|rule|Evasion Abilities Clause: Evasion abilities are banned
|rule|Evasion Moves Clause: Evasion moves are banned
|rule|Endless Battle Clause: Forcing endless battles is banned
|rule|HP Percentage Mod: HP is shown in percentages
|clearpoke
|poke|p1|Pikachu, L59, F|item
|poke|p1|Kecleon, M|item
|poke|p1|Jynx, F|item
|poke|p1|Mewtwo|item
|poke|p2|Hoopa-Unbound|
|poke|p2|Smeargle, L1, F|item
|poke|p2|Forretress, L31, F|
|poke|p2|Groudon, L60|item
|poke|p2|Feebas, L1, M|
|teampreview
|
|start
Player
|player|PLAYER|USERNAME|AVATAR|RATING
PLAYER - p1, p2 (or p3, p4 in 4-player battles)
USERNAME - Player’s username
AVATAR - Avatar identifier (usually a number)
RATING - Elo rating (only in rated battles, otherwise blank)
Team Size
Indicates the number of Pokémon the player starts with.
Game Type
GAMETYPE is one of:
singles
doubles
triples
multi
freeforall
Generation
Generation number from 1 to 9.
Stadium counts as its respective gen, Let’s Go counts as 7, and modded formats use their base gen.
Tier
The name of the format being played.
Rated
Present if the game affects ladder rating.
Present if the game is official (like tournament games).
Rule
Appears multiple times, once for each active rule.
Team Preview
Clear Poke
Marks the start of Team Preview.
Poke
|poke|PLAYER|DETAILS|ITEM
Declares a Pokémon for Team Preview.
PLAYER - Player ID (p1, p2, etc.)
DETAILS - Pokémon description (see “Identifying Pokémon” below)
ITEM - item if holding an item, blank otherwise
Forme and shininess are hidden in Team Preview, unlike in |switch| messages.
Team Preview End
Marks the end of Team Preview data.
Start
Indicates the battle has started.
Identifying Pokémon
Pokémon are identified by POSITION: NAME:
POSITION = Player (p1, p2) + position letter (a in singles)
NAME = Nickname (or species if no nickname)
Examples:
p1a: Sparky - Pokémon in player 1’s active slot named Sparky
p1: Dragonite - Inactive Dragonite (no position letter)
Position Layout
Doubles (Player 1’s perspective):
Doubles (Player 2’s perspective):
Multi (Player 1’s perspective):
Details String
DETAILS is comma-separated information:
SPECIES - Always present
, L## - If not level 100
, M - If male
, F - If female
, shiny - If shiny
, tera:TYPE - If Terastallized (Gen 9)
Examples:
Deoxys-Speed - Level 100 genderless non-shiny
Sawsbuck, L50, F, shiny - Level 50 shiny female
Arceus-* - Arceus in Team Preview (forme hidden)
Battle Progress
Spacer
Clears the message bar and adds a spacer to battle history.
Request
JSON object requesting a choice (move or switch). See Choice Requests for details.
Inactive Timer
Timer-related message (displayed in red). Timer is currently on.
Timer-related message. Timer is currently off.
Upkeep
Signals the upkeep phase where field condition timers are updated.
Turn
It is now turn NUMBER.
Win
USER won the battle.
Tie
The battle ended in a tie.
Timestamp
UNIX timestamp for determining when events occurred.
Major Actions
Major actions represent significant battle events like moves, switches, and fainting.
Move
|move|POKEMON|MOVE|TARGET
The specified Pokémon used MOVE at TARGET.
For moves with multiple targets or no target, TARGET should be ignored.
Tags:
|[miss] - The move missed
|[still] - Suppress animation
|[anim] MOVE2 - Use animation of MOVE2 instead
Example:
|move|p1a: Pikachu|Thunderbolt|p2a: Charizard
Switch
|switch|POKEMON|DETAILS|HP STATUS
A Pokémon switched in (intentional).
|drag|POKEMON|DETAILS|HP STATUS
A Pokémon was forced to switch (Whirlwind, Roar, etc.).
POKEMON|DETAILS - Identifies the Pokémon
HP - Current HP as fraction (CURRENT/MAX for your Pokémon, /100 or /48 for opponent)
STATUS - Status condition (slp, par, etc.) or blank
Example:
|switch|p1a: Garchomp|Garchomp, L78, M|248/248
|detailschange|POKEMON|DETAILS|HP STATUS
Permanent forme change (Mega Evolution, frozen Shaymin-Sky).
|-formechange|POKEMON|SPECIES|HP STATUS
Temporary forme change.
Replace
|replace|POKEMON|DETAILS|HP STATUS
Illusion ended for the specified Pokémon.
POKEMON uses the NEW Pokémon ID (Zoroark’s nickname). Everything you knew about the previous Pokémon is wrong.
Swap
Moves active POKEMON to POSITION (0-indexed from left).
Can’t
|cant|POKEMON|REASON|MOVE
Pokémon couldn’t perform a move due to REASON (paralysis, Disable, etc.).
Faint
The Pokémon fainted.
Minor Actions
Minor actions represent smaller battle events like damage, healing, and status changes.
Minor actions are usually displayed in small font in the official client.
Fail
The ACTION failed against POKEMON due to its own mechanics.
Block
|-block|POKEMON|EFFECT|MOVE|ATTACKER
An effect targeting POKEMON was blocked by EFFECT.
|[of]SOURCE may note the owner of EFFECT (e.g., ally with Aroma Veil).
Miss
Move used by SOURCE missed TARGET.
Damage
|-damage|POKEMON|HP STATUS
Pokémon took damage and is now at HP STATUS.
If HP is 0, STATUS should be ignored (currently fnt but may change).
Heal
Same as -damage, but for healing.
Set HP
Pokémon now has HP hit points.
Status
Pokémon was inflicted with STATUS.
|-curestatus|POKEMON|STATUS
Pokémon recovered from STATUS.
Pokémon used a move that cures its team (Heal Bell, Aromatherapy).
Stat Changes
Boost
|-boost|POKEMON|STAT|AMOUNT
Pokémon gained AMOUNT stages in STAT.
STAT abbreviations:
atk - Attack
def - Defense
spa - Special Attack
spd - Special Defense
spe - Speed
accuracy - Accuracy
evasion - Evasion
Unboost
|-unboost|POKEMON|STAT|AMOUNT
Same as -boost, but for negative stat changes.
Set Boost
|-setboost|POKEMON|STAT|AMOUNT
STAT is set to AMOUNT (Anger Point, Belly Drum).
Swap Boosts
|-swapboost|SOURCE|TARGET|STATS
Swaps boosts in STATS between SOURCE and TARGET.
STATS is comma-separated list (e.g., atk,def,spe).
Other Boost Operations
Invert all boosts (Topsy-Turvy).
Clear all boosts (Clear Smog).
Clear all boosts from all Pokémon (Haze).
|-clearpositiveboost|TARGET|POKEMON|EFFECT
Clear positive boosts (Spectral Thief).
|-clearnegativeboost|POKEMON
Clear negative boosts (Z-move effect).
|-copyboost|SOURCE|TARGET
Copy boosts from SOURCE to TARGET (Psych Up).
Field Conditions
Weather
Indicates current weather.
|[upkeep] means weather was active previously and continues. Otherwise, weather just changed or expired (none).
Field Start/End
Field condition started (Trick Room, Grassy Terrain).
Field condition ended.
Side Conditions
|-sidestart|SIDE|CONDITION
Side condition started (Tailwind, Stealth Rock, Reflect).
Side condition ended.
Side conditions swapped (Court Change).
Volatile Status
Start
Volatile status inflicted (confusion, Taunt, Substitute).
End
Volatile status from EFFECT ended.
Battle Effectiveness
Critical hit against POKEMON.
Super effective against POKEMON.
Not very effective against POKEMON.
POKEMON was immune.
Items
Item Revealed
|-item|POKEMON|ITEM|[from]EFFECT
Item changed or revealed due to move/ability.
Item announced on switch-in (Air Balloon).
End Item
|-enditem|POKEMON|ITEM|[from]EFFECT
Item destroyed by move/ability (Knock Off).
|[silent] if ownership changed (Thief, Trick).
Item consumed (Berry, Air Balloon).
Berries include |[eat] modifier.
Abilities
Ability Revealed
|-ability|POKEMON|ABILITY|[from]EFFECT
Ability changed due to move/ability.
Skill Swap doesn’t send this to avoid revealing allies’ abilities in Double/Triple battles.
|-ability|POKEMON|ABILITY
Ability announced on switch-in with long-term effect (Mold Breaker, Neutralizing Gas).
End Ability
Ability suppressed by Gastro Acid.
|-transform|POKEMON|SPECIES
Pokémon transformed into SPECIES (Transform move or Imposter).
Mega Evolution
Pokémon Mega Evolved using MEGASTONE.
Primal Reversion
Pokémon reverted to primal forme.
Ultra Burst
|-burst|POKEMON|SPECIES|ITEM
Pokémon Ultra Burst into SPECIES using ITEM.
Z-Move
Pokémon used Z-move version of its move.
Z-move broke through Protect and hit POKEMON.
Miscellaneous
Activate
Miscellaneous effect activated (for effects without better descriptors).
Hint
Displays MESSAGE in parentheses to explain why certain actions occurred.
Center
In Triple Battles, Pokémon automatically centered when only one remains per side.
Message
Miscellaneous message (primarily for custom mods and rule clauses).
Combine
Move combined with another (Fire Pledge + Grass Pledge).
Waiting
SOURCE is waiting for TARGET (Pledge moves).
Prepare
|-prepare|ATTACKER|MOVE|DEFENDER
Pokémon preparing to use charge move (Dig, Fly, Sky Drop).
Must Recharge
Pokémon must recharge (Hyper Beam).
Hit Count
Multi-hit move hit NUM times.
Single Move
|-singlemove|POKEMON|MOVE
Temporary effect lasting the duration of move (Grudge, Destiny Bond).
Single Turn
|-singleturn|POKEMON|MOVE
Temporary effect lasting the duration of turn (Protect, Focus Punch, Roost).
Next Steps
Choice Requests Learn how to respond to battle requests
Client-Server Messages Review non-battle protocol messages