From Esolang
Jump to navigation Jump to search

PokeBattle is a programming language designed so that the program looks like the transcript of a Pokemon battle.


When making a PokeBattle program, you must start by naming all of the Pokemon and trainers in the battle. No two Pokemon can have the same name. Use this header:

Trainer 1: *trainer*
Trainer 2: *trainer*

Battle Start!
Turn 0:
*trainer*: *pokemon* Go!
*trainer*: *pokemon* Go!

The Pokemon listed with Turn 0 are the starting Active Pokemon.

At the end of the program, you must include this footer:

Battle End!
Winner: *trainer*

Name whichever trainer you want as the winner; it doesn't matter.


Each Pokemon stores a single variable. This variable is the Pokemon's HP. Each Pokemon starts the battle/program with 5 HP. There is no maximum or minimum HP. Being at 0 or less HP has no special effect.

Pokemon Count and Names:
There are two versions of PokeBattle: Strict and Open.
In Strict PokeBattle, each trainer can only have 6 Pokemon and they must all be existing Pokemon from canon.
In Open PokeBattle, each trainer can have any number of Pokemon and they can have any name.
' In both modes, no Pokemon name is allowed to be used on both teams.

Pokemon and Moves:
There are no limits regarding which Pokemon can use which moves.


All commands must be done in the following format:

Turn 1:

Turn 2:

Turn 3:

Turn 4:

Each of the two commands in a turn must be from different trainers. The order may change freely between turns.
A move is from a trainer if:

  • It starts with the trainers name, or
  • It starts with the trainers active Pokemon.


NOP: (does nothing)
*trainer* tried to run away! You can't run from a trainer battle!
*pokemon* flinches!
*pokemon* uses Splash!

Damage: (reduce the HP of the opposing active Pokemon by the level of the move)
*pokemon* uses *move*!

  • Level 2: Tackle, Ember, Vine Whip, Water Gun, Thunder Shock, Rock Throw, Confusion, Mach Punch, Wing Attack, Powder Snow.
  • Level 4: Body Slam, Flamethrower, Razor Leaf, Hydro Pump, Thunderbolt, Earthquake, Psychic, High Jump Kick, Fly, Ice Beam.

As an additional effect, you can add either of these tags after the command:

  • "It's super effective!": the level of the move is doubled.
  • "It's not very effective.": the level of the move is halved.

Math Damage: (reduce the HP of the opposing Pokemon by the HP of the user)
*pokemon* uses *move*!
Moves: Hyper Beam, Dragon Rage.

OHKO: (Set the HP of the opposing Pokemon to zero)
*pokemon* uses *move*!
Moves: Fissure, Guillotine, Sheer Cold.

Heal: (increase the HP of the trainer's active Pokemon by the level of the item)
*trainer* uses *item*!

  • Level 1: Potion.
  • Level 2: Super Potion.
  • Level 4: Hyper Potion.
  • Level 8: Max Potion.

Leech: (increase the users HP by the HP of the opposing Pokemon)
*pokemon* uses *move*!
Moves: Absorb, Leech Life.

Sync: (Set the users HP to the HP of the opposing Pokemon)
*pokemon* uses *move*!
Moves: Skill Swap, Heart Swap.

Switch: (change the trainer's active Pokemon to the Pokemon named)
*trainer*: That's enough! Go *new_pokemon*!

Status: (inflict a status condition if the HP totals are right)
*pokemon* uses *move*!

  • Freeze: Blizzard
  • Paralyze: Thunder Wave
  • Sleep: Sing

Each condition only works if the HP totals are right:

  • Freeze requires the two active Pokemon to have matching HP totals.
  • Paralyze requires the two active Pokemon to have non-matching HP totals.
  • Sleep requires the opposing active Pokemon to have less HP than the Pokemon "using" the move.

If a status condition is inflicted, the next command is skipped.

Jump: (jumps code execution to the start of the named turn)
*trainer* thinks about Turn *number*.

Output: (outputs the HP of the user to the screen)
*pokemon* uses *move*!

  • ASCII: Swords Dance
  • Integer: Barrier

The data sent depends on which move was used:

  • ASCII outputs the ASCII character with an encoding value equal to user's HP.
  • Integer directly outputs the users HP as a number.

Input: (sets the HP of the opposing Pokemon to an input)
*pokemon* uses *move*!

  • ASCII: Growl
  • Integer: Lear

The data requested depends on which move was used:

  • ASCII takes in an ASCII character and uses its encoding value.
  • Integer takes in an integer and uses it.


Hello, world!

Trainer 1: Sprtch
Trainer 2: Sprcic

Battle start!
Turn 0:
Sprtch: 1 go!
Sprcic: 6 go!
(I can't write it, so I don't write it at all)